0

I'm the owner of the account and project. I login using the google cloud sdk and try the following command:

gsutils -m setmeta -h "Cache-Control:public, max-age=3600" gs//bucket/**/*.*

I get the following error for some of the files:

AccessDeniedException: 403 <owner@email.com> does not have storage.objects.update access to <filePath>

Most of the files are updated, but some are not. Because I have a lot of files, if 10% are not updated, that means a few gigs of data is not updated.

Any idea why this happens with an owner account and how to fix this?

yccteam
  • 2,168
  • 4
  • 25
  • 47
  • Does this answer your question? [AccessDeniedException: 403 Forbidden on GCS using owner account](https://stackoverflow.com/questions/27719495/accessdeniedexception-403-forbidden-on-gcs-using-owner-account) – Mahesh Khond Nov 06 '19 at 10:08

1 Answers1

1

If the Access Control on your bucket is set to Uniform you need to add permissions to it even if you are project owner.

For example:

I have a test file in a bucket and when I want to access it I get an access required popup.

I gave to my Owner account in the permissions tab of the bucket "Storage Object Admin" and now I can access it freely.

Here you have more info about Project Level Roles vs Bucket Level Roles.

Let me know.

Stefan G.
  • 890
  • 5
  • 10