Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Granting read access to the Authenticated Users group for a file

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:AuthenticatedUsers s3://BUCKET/FILE

like image 464
user983223 Avatar asked Jan 23 '12 22:01

user983223


People also ask

How do I give permission to authenticated users?

Set Permissions for Authenticated UsersType auth and click OK to return the Authenticated Users group. Select Authenticated Users, then click Allow for Full Control. Click OK to set permissions for authenticated users, then OK again to close the properties page.

What is authenticated users in folder permissions?

Authenticated Users encompasses all users who have logged in with a username and password. Everyone encompasses all users who have logged in with a password as well as built-in, non-password protected accounts such as Guest and LOCAL_SERVICE .

How do I add a user to authenticated users group?

In the Users in the current domain window, click the name of the group that you want to add users to (DataStage), and click OK. Authenticated users are not available. Click Action > Properties. In the Properties window, click the Members tab, and then click Add.


2 Answers

The following command works for me with s3cmd version 1.6.0: s3cmd setacl s3://<bucket>/<file-name> --acl-grant='read:http://acs.amazonaws.com/groups/global/AuthenticatedUsers' for an individual file.

s3cmd setacl s3://<bucket>/<dir-name> --acl-grant='read:http://acs.amazonaws.com/groups/global/AuthenticatedUsers' --recursive for all files in a directory.

like image 112
messinga Avatar answered Oct 14 '22 09:10

messinga


This doesn't seem to be possible with s3cmd. Instead I had to switch to the aws cli tools.

Here are the directions to install them: http://docs.aws.amazon.com/cli/latest/userguide/installing.html

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

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

like image 37
philbert Avatar answered Oct 14 '22 09:10

philbert