Updated on 2022-07-07 GMT+08:00

Setting Bucket Properties


You can use this command to set the properties of a bucket, such as storage classes and access policies.

Command Line Structure

  • In Windows
    obsutil chattri obs://bucket [-sc=xxx] [-acl=xxx] [-aclXml=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • In Linux or macOS
    ./obsutil chattri obs://bucket [-sc=xxx] [-acl=xxx] [-aclXml=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]


  • Take the Windows OS as an example. Run the obsutil chattri obs://bucket-test -acl=private command to change the access control policy of the bucket to private read and write.
    obsutil chattri obs://bucket-test -acl=private
    Set the acl of bucket [bucket-test] to [private] successfully, request id [04050000016836C5DA6FB21F14A2A0C0]

Parameter Description


Optional or Mandatory




Bucket name


Optional (additional parameter)

Default storage class of the bucket. Possible values are:

  • standard: OBS Standard, which features low access latency and high throughput, and is applicable to storing frequently accessed data (multiple accesses per month) or data that is smaller than 1 MB
  • warm: OBS Infrequent Access. It is applicable to storing infrequently accessed (less than 12 times a year) data that requires quick response.
  • cold: OBS Archive. It is secure, durable, and inexpensive, and applicable to archiving rarely-accessed (once a year) data.

If the multi-AZ mode is enabled for a bucket, the default storage class of the bucket cannot be set to cold.


Optional (additional parameter)

Access control policies that can be specified for buckets. Possible values are:

  • private
  • public-read
  • public-read-write

The preceding three values indicate private read and write, public read, and public read and write.


Optional (additional parameter)

Access control policy of the bucket, in XML format.

  • Owner: Optional. Specify the bucket owner's ID.
  • In AccessControlList, the Grant field contains the authorized users. Grantee specifies the IDs of authorized users. Canned specifies the authorized user group (currently, only Everyone is supported).
  • The following permissions can be granted: WRITE (write), WRITE_ACP (write ACL), READ (read), READ_ACP (read ACL), and FULL_CONTROL (full control).

Because angle brackets (<) and (>) are unavoidably included in the parameter value, you must use quotation marks to enclose them for escaping when running the command. Use single quotation marks for Linux or macOS and quotation marks for Windows.


Optional (additional parameter)

User-defined configuration file for executing a command. For details about parameters that can be configured, see Parameter Description.


Optional (additional parameter)

Specifies the endpoint.


Optional (additional parameter)

Specifies the user's AK.


Optional (additional parameter)

Specifies the user's SK.


Optional (additional parameter)

Specifies the user's security token.

Only one from sc, acl, or aclXml can be set for each command.