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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config to disable ACL in fog storage #2709

Closed

Conversation

stormsilver
Copy link
Contributor

Why?

AWS S3 used to use ACLs to control access to files. In recent times, AWS has moved away from this complicated permission model to one backed by the much-more-complicated (but widely used) IAM permission model. ACLs are now recommended against, and in fact new buckets created since April 2023 will have ACLs disabled by default.

This means that any upload to a newly-created bucket, and any upload to old buckets that have had ACLs disabled, will now fail with an error if the upload specifies an ACL.

CarrierWave always specifies an ACL.

Solution

Add a way to just not supply an ACL in the form of config.fog_acl = false. Since current versions of CarrierWave always specify an ACL, the default has been set to true to maintain backward compatibility, but since AWS now defaults to no ACL, the README has this value set to false.

Fixes #2664.

馃憖 I'm not familiar with Google's storage offering, but it appears they are in the same position according to #2634. However, I'm not sure if simply not setting Fog's public value is the right solution. If anyone who know's Google product can confirm, that'd be bananas.

Attribution

I started with #2666. (Thank you @jalkoby!) However, it didn't cover every scenario. Please let me know if I should be doing something different to maintain attribution.

@mshibuya mshibuya closed this in 7b37d56 Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How can I avoid specifying ACLs when uploading files to S3?
1 participant