Difference between revisions of "Gsutil acl ch"
Jump to navigation
Jump to search
↑ https://cloud.google.com/storage/docs/gsutil/commands/acl
Line 23: | Line 23: | ||
Grant the user with the specified canonical ID READ access to all objects in example-bucket that begin with folder/: | Grant the user with the specified canonical ID READ access to all objects in example-bucket that begin with folder/: | ||
− | * <code>gsutil acl ch -r \ | + | * <code>gsutil acl ch -r \ -u 84fac329bceSAMPLE777d5d22b8SAMPLE785ac2SAMPLE2dfcf7c4adf34da46:R \ |
− | |||
gs://example-bucket/folder/</code> | gs://example-bucket/folder/</code> | ||
Revision as of 09:20, 1 August 2022
gsutil acl ch
Ch Examples
gsutil acl ch -u AllUsers:R gs://example-bucket/example-object
Grant anyone on the internet WRITE access to the bucket example-bucket:
gsutil acl ch -u [email protected]:WRITE gs://example-bucket
Grant the group OWNER access to all jpg files in example-bucket:
gsutil acl ch -g [email protected]:O gs://example-bucket/**.jpg
Grant the owners of project example-project WRITE access to the bucket example-bucket:
gsutil acl ch -p owners-example-project:W gs://example-bucket
Remove access to the bucket example-bucket for the viewers of project number 12345:
gsutil acl ch -d viewers-12345 gs://example-bucket
Grant the user with the specified canonical ID READ access to all objects in example-bucket that begin with folder/:
gsutil acl ch -r \ -u 84fac329bceSAMPLE777d5d22b8SAMPLE785ac2SAMPLE2dfcf7c4adf34da46:R \
gs://example-bucket/folder/
See also
gsutil acl [ get | set | ch ]
gsutil
[config | singurl | mb | iam | cp | ls | acl | defacl | ubla | du | cors | --help
],$HOME/.boto, Cloud Shell
Advertising: