It is not possible to change only ACLs, patch provided

Bug #1235019 reported by Ryan Leavengood
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
goamz
New
Undecided
Unassigned

Bug Description

There are times when one only wants to make existing paths public or private or otherwise edit the ACL, but there is no way to do this with the s3 package.

I figured out how to do this though, and have added it to my local copy and it works well.

Attached is the patch. I called the new function PutACL.

I did not add a test.

Revision history for this message
Ryan Leavengood (leavengood) wrote :
Revision history for this message
Ryan Leavengood (leavengood) wrote :

Any updates?

If the current maintainers do not have the time to address these bugs, maybe some new maintainers could be sought.

I certainly would like to see my own patch added, and could add the needed test in that case.

Revision history for this message
Brandon Peters (kalthorn) wrote :

I'm also looking for this functionality, thanks for providing this.

Unfortunately it didn't quite work for me. It behaves the same as Put() does when I pass a nil payload meaning that it simply uploads a new/overwritten empty file with the new ACL. If you edit the s3 package debug messaging to show the outgoing request, you can see the PUT is:

PUT /bucketName/your.file HTTP/1.1

when it looks like it should be this:

PUT /bucketName/your.file?acl HTTP/1.1

at least according to this document: http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUTacl.html
(check the very last example from that docs).

When I append "?acl" to my path, it ends up getting percent encoded but I can't seem to find the spot where this happens.

Revision history for this message
Brandon Peters (kalthorn) wrote :

Ah I see, I can add it via the request params like so in PutACL:

params := url.Values{}
params.Add("acl", "")
req := &request{
  method: "PUT",
  bucket: b.Name,
  path: path,
  headers: headers,
  params: params,
 }
 return b.S3.query(req, nil)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.