Granting read access to the Authenticated Users group for a file

前端 未结 6 960
执念已碎
执念已碎 2021-02-07 21:14

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. W

6条回答
  •  你的背包
    2021-02-07 21:47

    This is from http://s3tools.org/s3cmd:

    Upload a file into the bucket ~$ s3cmd put addressbook.xml s3://logix.cz-test/addrbook.xml File 'addressbook.xml' stored as s3://logix.cz-test/addrbook.xml (123456 bytes) Note about ACL (Access control lists) — a file uploaded to Amazon S3 bucket can either be private, that is readable only by you, possessor of the access and secret keys, or public, readable by anyone. Each file uploaded as public is not only accessible using s3cmd but also has a HTTP address, URL, that can be used just like any other URL and accessed for instance by web browsers.

    ~$ s3cmd put --acl-public --guess-mime-type storage.jpg s3://logix.cz-test/storage.jpg File 'storage.jpg' stored as s3://logix.cz-test/storage.jpg (33045 bytes) Public URL of the object is: http://logix.cz-test.s3.amazonaws.com/storage.jpg

    Now anyone can display the storage.jpg file in their browser. Cool, eh?

    try changing public to authenticated and that should work.

    see http://docs.amazonwebservices.com/AmazonS3/latest/dev/ACLOverview.html#CannedACL it explains on amazon side how to use their ACLs, supposedly if you use public in s3cmd - this would translate to public-read in amazon, so authenticated should translate to authenticated-read.

提交回复
热议问题