<DIV>Vish ,</DIV>
<DIV> <SPAN class=short_text lang=en id=result_box><SPAN class="">Thank you for answering.</SPAN> </SPAN></DIV>
<DIV> While ,sorry,I don`t understand your said.</DIV>
<DIV> Do you mean I have to do like follows when I setting up acls:<BR><EM> </EM></DIV>
<DIV><EM><FONT size=2> curl ¨CX PUT -i \ <BR> -H "X-Auth-Token: <token of demo:demo>" \ <BR> -H "X-Container-Read: <tenant_id:user_id>" \ <BR> </FONT></EM><A href="http://127.0.0.1:8080/v1/AUTH_f1723800c821453d9f22d42d1fbb334b/demodirc"><EM><FONT size=2>http://127.0.0.1:8080/v1/AUTH_f1723800c821453d9f22d42d1fbb334b/demodirc</FONT></EM></A><EM><FONT size=2> </FONT></EM></DIV>
<DIV> </DIV>
<DIV> Or,other operations and settings? <BR></DIV>
<DIV><SIGN signid="1">
<DIV style="FONT-SIZE: 12px; COLOR: #909090; FONT-FAMILY: Arial Narrow">------------------</DIV>
<DIV style="FONT-SIZE: 14px; COLOR: #000; FONT-FAMILY: Verdana">
<DIV>
<DIV>Best Regards</DIV>
<DIV> </DIV>
<DIV>ZhangJialong</DIV></DIV></DIV></SIGN></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV style="COLOR: #000">
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 12px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; FONT-FAMILY: Arial Narrow">------------------ Original ------------------</DIV>
<DIV style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px">
<DIV id=menu_sender><B>From: </B> "Vishvananda Ishaya"<vishvananda@gmail.com>;</DIV>
<DIV><B>Date: </B> Sat, May 12, 2012 03:03 AM</DIV>
<DIV><B>To: </B> "ÕżÒÁú"<zhangjl@awcloud.com>; <WBR></DIV>
<DIV><B>Cc: </B> "openstack"<openstack@lists.launchpad.net>; <WBR></DIV>
<DIV><B>Subject: </B> Re: [Openstack] Swift Object Storage ACLs with KeyStone</DIV></DIV>
<DIV> </DIV>I'm not totally sure about this, but you might have to use the project_id from keystone instead of the project_name when setting up acls. The same may be true of user_id. <BR><BR>Vish
<DIV><BR>
<DIV class=gmail_quote>On Fri, May 11, 2012 at 12:51 AM, ÕżÒÁú <SPAN dir=ltr><<A href="mailto:zhangjl@awcloud.com" target=_blank>zhangjl@awcloud.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><BR>Hello, everyone.<BR> <BR> I encountered some problems when i set permissions (ACLs) on Openstack Swift containers.<BR> I installed swift-1.4.8(essex) and use keystone-2012.1 as authentication system on CentOS 6.2 .<BR> <BR> My swift proxy-server.conf and keystone.conf are here:<BR> <SPAN style="TEXT-DECORATION: underline"><A href="http://pastebin.com/dUnHjKSj" target=_blank>http://pastebin.com/dUnHjKSj</A> </SPAN><BR> <BR> Then,I use the script named opensatck_essex_data.sh(<SPAN style="TEXT-DECORATION: underline"> <A href="http://pastebin.com/LWGVZrK0" target=_blank>http://pastebin.com/LWGVZrK0</A> </SPAN>) to <BR> initialize keystone.<BR> <BR> After these operations,I got the token of demo:demo and newuser:newuser<BR> <BR> <FONT size=+0><SPAN style="FONT-STYLE: italic">curl -s -H 'Content-type: application/json' \</SPAN> <BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> -d '{"auth": {"tenantName": "demo", "passwordCredentials": {"username": "demo", "password": "admin"}}}' \</SPAN> <BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> <A href="http://127.0.0.1:5000/v2.0/tokens" target=_blank>http://127.0.0.1:5000/v2.0/tokens</A> | python -mjson.tool</SPAN> </FONT><BR> <BR> <FONT style="FONT-STYLE: italic" size=2>curl -s -H 'Content-type: application/json' \<BR> -d '{"auth": {"tenantName": "newuser", "passwordCredentials": {"username": "newuser", "password": "admin"}}}' \<BR> <A href="http://127.0.0.1:5000/v2.0/tokens" target=_blank>http://127.0.0.1:5000/v2.0/tokens</A> | python -mjson.tool</FONT> <BR> <BR> Then,enable read access to newuser:newuser<BR> <BR> <FONT size=+0><SPAN style="FONT-STYLE: italic">curl ¨CX PUT -i \</SPAN> <BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> -H "X-Auth-Token: <token of demo:demo>" \</SPAN> <BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> -H "X-Container-Read: newuser:newuser" \</SPAN> <BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> <A href="http://127.0.0.1:8080/v1/AUTH_f1723800c821453d9f22d42d1fbb334b/demodirc" target=_blank>http://127.0.0.1:8080/v1/AUTH_f1723800c821453d9f22d42d1fbb334b/demodirc</A> </SPAN></FONT><BR> <BR> Check the permission of the container:<BR> <BR> <FONT size=+0><SPAN style="FONT-STYLE: italic">curl -k -v -H 'X-Auth-Token:<token of demo:demo>' \</SPAN> <BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> <A href="http://127.0.0.1:8080/v1/AUTH_f1723800c821453d9f22d42d1fbb334b/demodirc" target=_blank>http://127.0.0.1:8080/v1/AUTH_f1723800c821453d9f22d42d1fbb334b/demodirc</A> </SPAN></FONT><BR> <BR> This is the reply of the operation:<BR> <BR> <FONT size=+0><SPAN style="FONT-STYLE: italic">HTTP/1.1 200 OK</SPAN> <BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> X-Container-Object-Count: 1</SPAN> <BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> X-Container-Read: newuser:newuser</SPAN> <BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> X-Container-Bytes-Used: 2735</SPAN> <BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> Accept-Ranges: bytes</SPAN> <BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> Content-Length: 24</SPAN> <BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> Content-Type: text/plain; charset=utf-8</SPAN> <BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> Date: Fri, 11 May 2012 07:30:23 GMT</SPAN> <BR style="FONT-STYLE: italic"><BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> opensatck_essex_data.sh</SPAN> </FONT><BR> <BR> Now,the user newuser:newuser visit the container of demo:demo<BR> <BR> <FONT size=+0><SPAN style="FONT-STYLE: italic">curl -k -v -H 'X-Auth-Token:<token of newuser:newuser>' \</SPAN> <BR style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic"> <A href="http://127.0.0.1:8080/v1/AUTH_f1723800c821453d9f22d42d1fbb334b/demodirc" target=_blank>http://127.0.0.1:8080/v1/AUTH_f1723800c821453d9f22d42d1fbb334b/demodirc</A> </SPAN></FONT><BR> <BR> While,I got <SPAN style="FONT-WEIGHT: bold; COLOR: rgb(255,0,0)">403</SPAN> <SPAN style="FONT-WEIGHT: bold"></SPAN>error.Can someone help me?<BR><BR>
<DIV><U></U>
<DIV style="FONT-SIZE: 12px; COLOR: #909090; FONT-FAMILY: Arial Narrow">------------------</DIV>
<DIV style="FONT-SIZE: 14px; FONT-FAMILY: Verdana">
<DIV>
<DIV>Best Regards</DIV>
<DIV> </DIV>
<DIV>ZhangJialong</DIV></DIV></DIV><U></U></DIV>
<DIV> </DIV><BR>_______________________________________________<BR>Mailing list: <A href="https://launchpad.net/~openstack" target=_blank>https://launchpad.net/~openstack</A> <BR>Post to : <A href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</A> <BR>Unsubscribe : <A href="https://launchpad.net/~openstack" target=_blank>https://launchpad.net/~openstack</A> <BR>More help : <A href="https://help.launchpad.net/ListHelp" target=_blank>https://help.launchpad.net/ListHelp</A> <BR><BR></BLOCKQUOTE></DIV><BR></DIV></DIV>