ccb80d725d
Updated a typo (keystone-mange -> keystone-manage) Updated a few capitalization errors in titles Change-Id: I38ec2a6c53b9e3a1e1bf330b54c26f293a764d94 author: diane fleming
41 lines
2.3 KiB
XML
41 lines
2.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<section xmlns="http://docbook.org/ns/docbook"
|
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
|
|
xml:id="managing-openstack-object-storage-with-swift-cli">
|
|
<title>Manage objects and containers</title>
|
|
<para>The OpenStack Object Storage Service provides the
|
|
<command>swift</command> client, which is a command-line
|
|
interface (CLI). Use this client to list objects and
|
|
containers, upload objects to containers, and download or
|
|
delete objects from containers. You can also gather statistics
|
|
and update metadata for accounts, containers, and objects.</para>
|
|
<para>This client is based on the native swift client library,
|
|
<literal>client.py</literal>, which seamlessly
|
|
re-authenticates if the current token expires during
|
|
processing, retries operations multiple times, and provides a
|
|
processing concurrency of 10.</para>
|
|
<para>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 <literal>X-Container-Read</literal> and
|
|
<literal>X-Container-Write</literal> header,
|
|
respectively.</para>
|
|
<para>To give a user read access, use the <command>swift
|
|
post</command> command with the <parameter>-r</parameter>
|
|
parameter. To give a user write access, use the
|
|
<parameter>-w</parameter> parameter.</para>
|
|
<para>The following example enables the
|
|
<literal>testuser</literal> user to read objects in the
|
|
container:</para>
|
|
<screen><prompt>$</prompt> <userinput>swift post -r 'testuser'</userinput></screen>
|
|
<para>You can also use this command with a list of users.</para>
|
|
<para>If you use StaticWeb middleware to enable Object Storage to
|
|
serve public web content, use <literal>.r:</literal>, followed
|
|
by a list of allowed referrers.</para>
|
|
<para>The following command gives object access to all referring
|
|
domains:</para>
|
|
<screen><prompt>$</prompt> <userinput>swift post -r '.r:*'</userinput></screen>
|
|
</section>
|