openstack-manuals/doc/user-guide/source/cli_swift_manage_access_swift.rst
Andreas Jaeger 28d95bfc66 End User Guide: Remove user_only and orphan
With the split of the User Guides, there's no need anymore to have
orphan and user_only flags, remove them from the user-guide
directory.

Only files that keep :orphan: are
doc/user-guide/source/hot-guide/hot_advanced_topics.rst and
hot_existing_templates.rst since these files are not currently included.

Change-Id: I1ac0356d69d8668785f8b1947e8b061731aca747
2015-05-13 18:09:16 +00:00

994 B

Manage access

  • Users have roles on accounts. For example, a user with the admin role has 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 you set with the X-Container-Read and X-Container-Write headers.

    To give a user read access, use the swift post command with the -r parameter. To give a user write access, use the -w parameter.

    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 StaticWeb middleware to enable Object Storage to serve public web content, use .r:, followed by a list of allowed referrers.

    The following command gives object access to all referring domains:

    $ swift post -r '.r:*'