2016-12-07 50 views
0

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 s3api put-object-acl --acl來更改寫入權限嗎?

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

我在你的問題中增加了一些基本格式,所以它更易於閱讀。請查看[Stack Overflow的格式化文檔](https://stackoverflow.com/help/formatting),以便您下次可以自己做。但是你的問題還不清楚。請[編輯]它並添加一些上下文。 – Chris

回答

0

使用ACL授予特定帳戶WRITE獲准在桶的水平纔有可能。對象仍然可以使用加載ACL授予PUBLIC-READ-WRITE權限,但只有READ權限將被設置。

對象的ACL被限制爲授予特定帳戶READREAD_ACP(讀ACL),或WRITE_ACP(寫ACL)的權限,並FULL_CONTROL授予所有三個權限。也就是說,您在那裏發佈的CLI命令是正確的,並且AWS對對象ACL有相同的限制。

有關創建對象ACL的更多信息,see the API documentation

相關問題