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

s3cmd put ignores the --acl-grant flag #743

Open
zioproto opened this Issue May 12, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@zioproto

zioproto commented May 12, 2016

s3cmd version 1.6.1

Using the -P flag correctly the client sends the x-amz-acl header

s3cmd put -d -P file.txt s3://bucketname/

You can verify the acl with:

s3cmd info s3://bucketname/file.txt

There will be an addition line:

ACL:       *anon*: READ

However using the --acl-grant option during the put operation is ignored, and the x-amz-acl header is not sent

s3cmd put -d --acl-grant=read:username file.txt s3://bucketname/

The ACL is not set, a second command is needed:

s3cmd setacl -d --acl-grant=read:username  s3://bucketname/file.txt

Now you will see

   ACL:       username: READ

Should be possible to define ACL during the put operation, and not only in a second call using s3cmd setacl. See docs:
http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html

This could be a duplicate of Issue #61

@fviard fviard self-assigned this Mar 4, 2018

@fviard fviard added the to-be-fixed label Mar 4, 2018

@fviard

This comment has been minimized.

Show comment
Hide comment
@fviard

fviard Mar 4, 2018

Contributor

Indeed a missing feature/bug.
Public acl is easily set with canned-acl.
In object_put request, support for the following headers would be needed:
x-amz-grant-read, x-amz-grant-read-acp, and x-amz-grant-write-acp, x-amz-grant-full-control
https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html

Copy and modify support setting custom acl, but only afterward through a second request through to set_acl.

Contributor

fviard commented Mar 4, 2018

Indeed a missing feature/bug.
Public acl is easily set with canned-acl.
In object_put request, support for the following headers would be needed:
x-amz-grant-read, x-amz-grant-read-acp, and x-amz-grant-write-acp, x-amz-grant-full-control
https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html

Copy and modify support setting custom acl, but only afterward through a second request through to set_acl.

@acejam

This comment has been minimized.

Show comment
Hide comment
@acejam

acejam May 29, 2018

Any progress on this?

acejam commented May 29, 2018

Any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment