Aws-cli: aws s3 sync source_folder S3/bucket_name -acl public-read does not make all the files uploaded as public

Created on 15 Oct 2015  路  10Comments  路  Source: aws/aws-cli

I have a bunch of files on my computer which I sync with an S3 bucket. I used to do it using management console but started using CLI recently. I would like to find the counterpart for "make public" option on management console in CLI. Looks like the below command is supposed to set all the files affected during the sync operation should be made public-read but that does not happen.

aws s3 sync source_dir s3://bucket_name --acl public-read

closing-soon guidance

Most helpful comment

old thread, but FWIW I had the same issue today (aws-cli/1.11.15 Python/2.7.10 Darwin/16.6.0 botocore/1.4.72) and I was able to resolve it by specifying another ACL first, and then public-read. With only specifying public-read it didn't work .. haven't look at the code to see why but just thought I'd drop this on the thread in case anyone is still having the problem.

Example:
aws s3 sync dist/ s3://asf83jrkf/dev/ --acl bucket-owner-full-control --acl public-read

All 10 comments

I'm not able to reproduce. What version of the CLI are you using (aws --version)? The sync command will only affect files that are updated on the bucket.

I'm closing this issue due to inactivity.

I have this issue too. Here's my version info:

aws-cli/1.11.9 Python/2.7.1 Darwin/11.4.2 botocore/1.4.66

same issue

aws --version
aws-cli/1.11.10 Python/3.4.4 Darwin/15.6.0 botocore/1.4.67

the same issue
aws-cli/1.11.12 Python/2.7.6 Linux/3.13.0-48-generic botocore/1.4.69

old thread, but FWIW I had the same issue today (aws-cli/1.11.15 Python/2.7.10 Darwin/16.6.0 botocore/1.4.72) and I was able to resolve it by specifying another ACL first, and then public-read. With only specifying public-read it didn't work .. haven't look at the code to see why but just thought I'd drop this on the thread in case anyone is still having the problem.

Example:
aws s3 sync dist/ s3://asf83jrkf/dev/ --acl bucket-owner-full-control --acl public-read

@41349 Thanks! It's a bit of a weird solution, but works great!

I had uploaded with sync, without any ACL. Doing a subsequent sync with the "--acl public-read" did nothing: the permissions on objects were not changed. I deleted my S3 contents and did the sync again, with public-read again, and saw that all my files had gotten the public permissions.

It's as if the sync doesn't check the ACL if it sees the object is already there.

I get the same problems and we get no response from the maintainers on this. Bump.

I had uploaded with sync, without any ACL. Doing a subsequent sync with the "--acl public-read" did nothing: the permissions on objects were not changed. I deleted my S3 contents and did the sync again, with public-read again, and saw that all my files had gotten the public permissions.

It's as if the sync doesn't check the ACL if it sees the object is already there.

I had the same behavior.

Was this page helpful?
0 / 5 - 0 ratings