aws-s3 icon indicating copy to clipboard operation
aws-s3 copied to clipboard

"Invalid group: uri" while setting :authenticated_read

Open mislav opened this issue 14 years ago • 0 comments
trafficstars

My object was private and I wanted to grant the READ permission to authenticated users:

policy = S3Object.acl(name, bucket)
policy.grants << ACL::Grant.grant(:authenticated_read)
# persist it:
S3Object.acl(name, bucket, policy)  # BOOM! doesn't work

The exception is from the server: "Invalid group uri". This is what it was trying to send (for the offending grant):

<Grantee xsi:type="Group" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <URI>http://acs.amazonaws.com/groups/global/Authenticated</URI>
</Grantee>

I think it Amazon choked because it wanted this URI instead:

http://acs.amazonaws.com/groups/global/AuthenticatedUsers

mislav avatar Oct 14 '11 15:10 mislav