问题
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:
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 otherAccount@gmail.com:FC
$> gsutil do stuff with original account
来源:https://stackoverflow.com/questions/20330066/lost-permission-on-my-cloud-storage-bucket-how-to-reset-them