开发者

paperclip overwrites / resets S3 permissions for non-bucket-owners

I have opened this as an issue on Github (http://github.com/thoughtbot/paperclip/issues/issue/225) but on the chance that I'm just doing this wrong, I thought I'd also ask about it here. If someone can tell me where I'm going wrong, I can close the issue and save the Paperclip guys some trouble.

Issue:

When using S3 for storage, and you wish your bucket to allow access to other users to whom you have granted access, Paperclip appears to overwrite the permissions on the bucket, removing access to these users.

Process for duplication:

  • Create a bucket in S3 and set up a Rails app with Paperclip to use this bucket for storage
  • Add a user (for example, aws@zencoder.com, the user for the video encoding service Zencoder) to the bucket,开发者_StackOverflow社区 and grant this user List and Read/Write permissions.
  • Upload a file.
  • Refresh the permissions. The user you added will be gone. As well, a user "Everyone" with read permissions will have been added.

The end result is that you cannot, so far as I can tell, retain desired permissions on your bucket when using Paperclip and S3.

Can anyone help?


Try explicitly setting :s3_permissions => :public_read
Seems to work for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜