Manage object storage
The Object Storage service provides the
swift command-line interface (CLI) that
enables you to gather statistics, list items, update metadata,
upload, download, and delete files. This client is based on
the native swift client library, client.py,
which seamlessly re-authenticates if the current token expires
during processing, retries operations multiple times, and
provides a processing concurrency of 10.
Users have roles on accounts. For example, the admin
role enables full access to all containers and objects in an
account.
You can set access control lists (ACLs) at the container level
and support lists for read and write access, which are set
with the X-Container-Read and
X-Container-Write header
respectively.
You can use the swift client to set
the ACLs by using the post subcommand with
the -r parameter for the read access
and -w parameter for the write access.
The following example enables the testuser
user to read objects in the container:
$ swift post -r 'testuser'
You can also use this command with a list of users.
If you use the StaticWeb middleware to enable Object
Storage to serve public web content, the syntax for allowed
referrers is .r: followed by a list of
allowed referrers.
The following command gives object access to all referring
domains:
$ swift post -r '.r:*'