授予对文件的“经过身份验证的用户"组的读取访问权限 [英] Granting read access to the Authenticated Users group for a file
问题描述
如何授予文件对Authenticated Users组的读取访问权限?我正在使用s3cmd,并且想在上传时执行此操作,但我只是直接专注于更改ACL.我应该为 http://acs.amazonaws.com/groups/global/AuthenticatedUsers 输入什么一个>?我已经尝试了AuthenticatedUsers的所有组合.
How do I grant read access to the Authenticated Users group for a file? I'm using s3cmd and want to do it while uploading but I'm just focusing directly on changing the acl. What should I put in for http://acs.amazonaws.com/groups/global/AuthenticatedUsers? I have tried every combination of AuthenticatedUsers possible.
./s3cmd setacl --acl-grant = read:http://acs.amazonaws.com/groups/global/AuthenticatedUsers s3://BUCKET/FILE
./s3cmd setacl --acl-grant=read:http://acs.amazonaws.com/groups/global/AuthenticatedUsers s3://BUCKET/FILE
./s3cmd setacl --acl-grant = read:AuthenticatedUsers s3://BUCKET/FILE
./s3cmd setacl --acl-grant=read:AuthenticatedUsers s3://BUCKET/FILE
推荐答案
使用s3cmd似乎无法实现.相反,我不得不切换到aws cli工具.
This doesn't seem to be possible with s3cmd. Instead I had to switch to the aws cli tools.
以下是安装它们的说明: http://docs.aws.amazon.com/cli/latest/userguide/installing.html
Here are the directions to install them: http://docs.aws.amazon.com/cli/latest/userguide/installing.html
可以使用以下命令将acl设置为通过身份验证的用户在上传过程中读取的内容:
It's possible to set the acl to read by authenticated users during upload with the command:
aws s3 cp <file-to-upload> s3://<bucket>/ --acl authenticated-read
加上全部其他组合,您可以在此处查看: http://docs.aws.amazon .com/cli/latest/reference/s3/index.html#cli-aws-s3
Plus a whole load of other combinations you can check out here: http://docs.aws.amazon.com/cli/latest/reference/s3/index.html#cli-aws-s3
这篇关于授予对文件的“经过身份验证的用户"组的读取访问权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!