0
votes

I've moved some files across from S3 to GCS but the objects are now owned by the transfer service, when I try to update the ACL using GSUTIL it says I am not the owner. It seems because the transfer service created the objects it owns them. Is there a way to mimic the transfer service (or log in via it's service account) in order to change the ownership to myself.

Service account name:

project-XXXXXXXXX@storage-transfer-service.iam.gserviceaccount.com

I'm trying to run this command:

gsutil acl ch -u allUsers:R gs://[BUCKETNAME]/

When doing so I get this error:

Please ensure you have OWNER-role access to this resource

Please help.

1
Just a quick question, your bucket Access control has been set as Uniform? If so, open your bucket edit page and change Access control to Fine-grained.Andie Vanille

1 Answers

0
votes

It looks like you don't have privileges/permission to run that command. Please make sure that your account have one the following roles in IAM to execute the command or to make a changes on your bucket:

  • roles/owner
  • roles/editor
  • roles/storage.admin