Updated on 2026-08-21 GMT+08:00

Configuring WORM for a Bucket

If you want to prevent any user (including the bucket or object owner) from modifying or deleting all objects in an OBS bucket for a specified period, you can configure bucket-level WORM.

This section describes how to configure WORM when creating a bucket, after a bucket is created, and how to cancel or modify the default retention period of bucket-level WORM.

Constraints

  • Once WORM is enabled for a bucket, it cannot be disabled. However, you can disable the bucket's default retention period.
  • Once WORM is enabled for a bucket, versioning cannot be suspended for that bucket.
  • Buckets with WORM enabled do not support cross-region replication.
  • A bucket-level WORM policy applies only to objects uploaded after the policy is configured. To protect existing objects, configure object-level WORM separately.
  • WORM-protected objects cannot be migrated.
  • The metadata of a WORM-protected object can still be modified.
  • Parallel file systems do not support WORM.

Important Notes

  • Before configuring object-level WORM, you must enable bucket-level WORM. If an object is protected by both bucket-level and object-level WORM, the object-level WORM policy takes precedence.
  • The retention period of object-level WORM can only be extended but cannot be shortened.
  • If you have deregistered your account or your account has been frozen, the WORM-protected objects will be permanently deleted.
  • WORM does not protect parts generated during multipart uploads.
  • When configuring bucket logging, do not store logs in a bucket with an active WORM retention policy. Because old files cannot be deleted, storage cost will continue to increase.
  • If a bucket has WORM enabled, an append upload on this bucket will fail, with a 403 error returned.
  • Only the compliance mode is supported.

Access Control

To configure a bucket-level WORM policy, you must be the bucket owner or have the required permission. For authorization details, see Configuring a Default WORM Policy for a Bucket.

Configuring WORM When Creating a Bucket

You can use OBS Console or APIs to configure bucket-level WORM.

Configuring WORM After a Bucket Is Created

You can use OBS Console or APIs to configure bucket-level WORM.

Canceling or Modifying the Default Retention Period

You can use OBS Console or APIs to cancel or modify the default retention period.

References