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

Cannot insert legacy ACL for an object when uniform bucket-level access is enabled. #2634

Closed
sgrverma24 opened this issue Sep 30, 2022 · 2 comments

Comments

@sgrverma24
Copy link

Hi all,

Uploading file to google cloud bucket was working fine when we had "Fine-grained" access. Later it is changed to "uniform bucket-level access". Now upload operations are failing with the below error.

invalid: Cannot insert legacy ACL for an object when uniform bucket-level access is enabled. Read more at https://cloud.google.com/storage/docs/uniform-bucket-level-access (Google::Apis::ClientError)

Any solutions/suggestions to tackle this issue.

Using 'carrierwave': '1.3.2'

@lguida-nasdaq
Copy link

Any news on this? I have been searching how to handle this error as the security team is pushing us to use Uniform bucket-level access.

Looks like the fog-google gem has an option for it: https://github.com/fog/fog-google/blob/c0b13cee73b0493acf76f4c442aeeba85028d8a4/lib/fog/storage/google_json/models/file.rb#L120

@lguida-nasdaq
Copy link

lguida-nasdaq commented Nov 27, 2023

So, after digging a little more, I came up with this solution:

CarrierWave.configure do |config|
  # other configs
  config.fog_attributes = { uniform: true }
end

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

No branches or pull requests

2 participants