1
votes

I ran gsutil.py acl set -R public-read gs://dsa-assets and now I see that it override every users permission and I can't upload new file or even delete this bucket. What can I do to reset permission on my bucket or to delete this bucket ?

1
If you are the owner of the objects in the bucket, you should be able to change the ACL backjterrace

1 Answers

3
votes

gsutil acl set -R public-read gs://bucketName will set the ACL for bucketName and all of the objects inside of bucketName to the canned ACL public-read. This ACL grants all users read access to the bucket and objects, and it grants FULL_CONTROL to the bucket or object owner.

Every ACL includes FULL_CONTROL for the bucket or object owner. The owner of the bucket will always have FULL_CONTROL of the bucket that they own, no matter how they try.

If you find that you can no longer upload files to the bucket, it is likely that you are not using gsutil with an account that owns the bucket. Figure out which project owns the bucket, and make sure that your account is in the owners group of that project.

Alternately, you could switch which account you're using for gsutil to one that is a project owner temporarily. The easiest way to do this is by using the BOTO_CONFIG environment variable to control multiple profiles:

$> BOTO_CONFIG=/home/me/.boto.owner gsutil config
# Follow prompts to set up account, use an account that owns the bucket
$> BOTO_CONFIG=/home/me/.boto.owner gsutil acl ch -u [email protected]:FC
$> gsutil do stuff with original account