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

Editing a file resets the ACL #8

Open
benwad opened this issue Jan 10, 2018 · 2 comments
Open

Editing a file resets the ACL #8

benwad opened this issue Jan 10, 2018 · 2 comments
Assignees
Labels

Comments

@benwad
Copy link

benwad commented Jan 10, 2018

First of all, great tool! I love the editor integration, makes everything really easy.

The issue I'm getting is that editing a file with the public-read ACL then saving it results in the file no longer being publicly accessible.

Steps to reproduce:

  1. Create a file on a bucket, give it the public-read canned ACL.
  2. Edit this file with s3-edit, save it.
  3. Attempt to view the file unauthenticated from its URL.
@tsub
Copy link
Owner

tsub commented Feb 17, 2018

Thank you for your report, and sorry for late confirmation.

I confirmed that it reproduced by the method you introduced.
And I understood the cause.

I will consider measures.

@tsub
Copy link
Owner

tsub commented Feb 17, 2018

I thought about measures, but it is difficult.
Implementation may take time.

The reasons are described below.

The issue I'm getting is that editing a file with the public-read ACL then saving it results in the file no longer being publicly accessible.

The reason is that ACL is initialized when PutObject API is executed.
Therefore, the countermeasure method is to acquire the previous ACL using the GetObjectAcl API and specify it when using the PutObject API.

However, the return value of GetObjectAcl API and the argument structure of PuObject API are quite different in aws-sdk-go.

Therefore, it is difficult to interpret the return value of GetObjectAcl API yourself and pass it as an argument of PutObject API.

The following is the document of aws-sdk-go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants