Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

s3cmd sync not setting ACL to public

I'm trying to use s3cmd on ubuntu 10.04 to sync with a local folder. This is working great for getting the contents from the local drive out to S3. However, I want the file ACL to be "public", yet all the files are coming through without it.

In my .s3cfg file, I set:

acl_public = True

I've tried:

s3cmd sync -P --delete-removed "$TARGETFOLDER" "s3://$BUCKET/"

I've also tried:

s3cmd sync --acl-public --delete-removed "$TARGETFOLDER" "s3://$BUCKET/"

And, for kicks, also tried this:

s3cmd sync -P --acl-public --delete-removed "$TARGETFOLDER" "s3://$BUCKET/"

Any ideas?

Update

I have set the ACL on the target bucket as Read/Write/Full-Control for authenticated users and administrator, and read-only for Everyone.

like image 785
karlgrz Avatar asked Sep 14 '10 16:09

karlgrz


People also ask

What is ACL public read?

To manage an object's access permissions, AWS uses an Access Control List (AWS). This ACL stores all the users and groups that have access to read — or write — an object. Assuming you want your files to be public readable, you have to give read access to the AWS AllUsers group.

How do I enable ACL for S3 bucket?

To set ACL permissions for a bucketSign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/ . In the Buckets list, choose the name of the bucket that you want to set permissions for. Choose Permissions. Under Access control list, choose Edit.


1 Answers

I tried it out right now. Making things public while synching can definitely be achieved with the acl-public option:

s3cmd sync --acl-public s3://source-bucket/ s3://target-bucket/
like image 141
schmijos Avatar answered Nov 03 '22 19:11

schmijos