Ask Your Question
0

Upload object to container which is set by ACL shows "access was denied to this resource"

asked 2012-11-15 03:52:54 -0500

I upload a object to container (with Read/Write ACL) The message shows as below:


Error trying to create container 'Rice_container': 403 Forbidden: 403 Forbidden

Access was denied to this resource.


However, it uploaded successfully.


Here are my rules: 1. only one admin user in an account 2. all container create by admin 3. a user will be assigned an container(created by admin) by setting r/w ACL

----Stat Rice_container by admin---- rice@rice-NB:~$ swift -A https://127.0.0.1:8080/auth/v1.0 -U Rice:admin -K stat Rice_container Account: AUTH_103ab08b-e95a-4eb3-8df3-a8d551d919f6 Container: Rice_container Objects: 0 Bytes: 0 Read ACL: Rice:Rice Write ACL: Rice:Rice Sync To: Sync Key: Accept-Ranges: bytes X-Timestamp: 1352977831.73894

----Stat Rice_container by Rice---- rice@rice-NB:~$ swift -A https://127.0.0.1:8080/auth/v1.0 -U Rice:Rice -K stat Rice_container Account: AUTH_103ab08b-e95a-4eb3-8df3-a8d551d919f6 Container: Rice_container Objects: 0 Bytes: 0 Read ACL: Write ACL: Sync To: Sync Key: Accept-Ranges: bytes X-Timestamp: 1352977831.73894

*Upload object to Rice_container by Rice* rice@rice-NB:~$ swift -A https://127.0.0.1:8080/auth/v1.0 -U Rice:Rice -K upload Rice_container FileABC Error trying to create container 'Rice_container': 403 Forbidden: 403 Forbidden

Access was denied to this resource.

FileABC

----list Rice_container by Rice---- rice@rice-NB:~$ swift -A https://127.0.0.1:8080/auth/v1.0 -U Rice:Rice -K list Rice_container FileABC

Could anyone explain me why?? Thanks. :D

Best regards, Rice Li

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2012-11-15 17:59:55 -0500

torgomatic gravatar image

The swift command-line tool will issue a POST to the container to ensure it exists before any objects are uploaded. Since the user in question may read and write objects in the container but not the container itself, you get a 403 for the POST, and then the object PUT requests work as intended.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-11-15 03:52:54 -0500

Seen: 107 times

Last updated: Nov 15 '12