aws --endpoint-url=https://s3-api.us-geo.objectstorage.softlayer.net s3api put-object-acl --bucket mytestbucket --key foo.txt --acl public-read-write
aws --endpoint-url=https://s3-api.us-geo.objectstorage.softlayer.net s3api get-object-acl --bucket mytestbucket --key foo.txt
{
"Owner": {
"DisplayName": "b25ce81dcaa1498db3d1c802b3fdd",
"ID": "b25ce81dcaa1498db3d1c802b3fdd"
},
"Grants": [
{
"Grantee": {
"Type": "Group",
"URI": "ttp://acs.amazonaws.com/groups/global/AllUsers"
},
"Permission": "READ"
},
{
"Grantee": {
"Type": "CanonicalUser",
"DisplayName": "b25ce81dcaa1498db3d1c802b3fdd",
"ID": "b25ce81dcaa1498db3d1c802b3fdd"
},
"Permission": "FULL_CONTROL"
}
]
}
答案 0 :(得分:0)
使用ACL授予特定帐户WRITE
权限只能在存储桶级别进行。仍然可以使用预设ACL为对象授予PUBLIC-READ-WRITE
权限,但只会设置READ
个权限。
对象ACL仅限于授予特定帐户READ
,READ_ACP
(读取ACL)或WRITE_ACP
(写入ACL)权限,FULL_CONTROL
授予所有三种权限。也就是说,您发布的CLI命令是正确的,AWS对对象ACL也有相同的限制。
有关创建对象ACL的更多信息,请see the API documentation。