Change - Google cloud storage, transfer Service - Change Object ownership

359 views Asked by At

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

There are 1 answers

2
JM Gelilio On

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