Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws s3 sync --acl does not update the ACL of existing files on S3 #3215

Open
nchammas opened this issue Mar 24, 2018 · 10 comments
Open

aws s3 sync --acl does not update the ACL of existing files on S3 #3215

nchammas opened this issue Mar 24, 2018 · 10 comments
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue s3sync s3

Comments

@nchammas
Copy link

If you sync some files from local storage to S3 and then re-run the same sync command with a new --acl setting, you'd expect the ACLs of the existing objects on S3 to be updated. However, they are not.

So, for example, after running these commands:

aws s3 rm --recursive s3://my-bucket/test/
aws s3 sync --acl public-read local-dir/ s3://my-bucket/test/
aws s3 sync --acl private local-dir/ s3://my-bucket/test/

The objects in s3://my-bucket/test/ will all have an ACL of public-read, when they should have an ACL of private.

What I'm running:

aws-cli/1.14.60 Python/3.6.4 Darwin/17.4.0 botocore/1.9.13

Related: #901, #1060 (comment)

@jamesls
Copy link
Member

jamesls commented Mar 29, 2018

Hi thanks for reporting. It seems like this issue is a dupe of the those related issues you linked. Was there something different in this issue you wanted to call out?

I think the underlying problem is that the --acl option only applies to files it transfers during a sync. It doesn't check to make sure the acls of all the destination objects match the source objects' acl.

@jamesls jamesls added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Mar 29, 2018
@nchammas
Copy link
Author

I think they are closely related but separate issues. They may well have the same root cause, but to the end-user the problem is slightly different.

To highlight the differences between this issue and the others:

I think the bug report here stands well on its own since it is clear, focused, and comes with a minimal reproducer.

@kyleknap kyleknap removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jun 14, 2018
@tim-kos
Copy link

tim-kos commented Mar 19, 2019

Any update on this issue?

1 similar comment
@jtomaszon
Copy link

Any update on this issue?

@kyleknap
Copy link
Member

kyleknap commented Sep 4, 2019

Marking as enhancement. It's slightly different than the linked issues but if we update to preserve ACL's, we will update to support updating ACL's based on the explicitly provided ACL.

@kyleknap kyleknap added feature-request A feature should be added or improved. s3 labels Sep 4, 2019
@tmillner
Copy link

Bump

@rodrigomurta
Copy link

It would be nice to have this upgrade.

@mllanes
Copy link

mllanes commented Oct 26, 2020

Bumpy bumpy

@peabnuts123
Copy link

Please try not to bump threads - just vote 👍 on the OP. Bumping threads sends notifications, it doesn't help teams prioritise.

@homerjam
Copy link

homerjam commented Dec 1, 2020

Just in case this is useful in the meantime...

Credit

# Recursively apply ACL to all objects in a bucket
$ aws s3 cp --recursive --acl public-read --metadata-directive REPLACE s3://bucket s3://bucket

thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this issue Feb 12, 2022
* fix: add log streaming to `sam build` - IMAGE functions

* fix: get closer to 95% test coverage

* fix: address comments

- Add type hinting
- Add additional tests

* fix: make mypy and lint happy

* fix: address feedback
@tim-finnigan tim-finnigan added s3sync p3 This is a minor priority issue labels Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue s3sync s3
Projects
None yet
Development

No branches or pull requests