Difference between revisions of "Ch"

From wikieduonline
Jump to navigation Jump to search
Line 3: Line 3:
 
<code>gsutil acl ch</code>
 
<code>gsutil acl ch</code>
  
CommandException: command updates access control lists, similar in spirit to the Linux chmod command.
+
<pre>CommandException: command updates access control lists, similar in spirit to the Linux chmod command.
  
 
Grant the user john . doe @ example . com WRITE access to the bucket example-bucket:
 
Grant the user john . doe @ example . com WRITE access to the bucket example-bucket:
Line 21: Line 21:
  
 
gsutil -m acl ch -R -g my-domain.org:R -g AllAuth:R \
 
gsutil -m acl ch -R -g my-domain.org:R -g AllAuth:R \
   -u [email protected]:O gs://my-bucket/ gs://my-other-bucket
+
   -u [email protected]:O gs://my-bucket/ gs://my-other-bucket</pre>
  
  

Revision as of 08:53, 1 August 2022

gsutil acl ch

CommandException: command updates access control lists, similar in spirit to the Linux chmod command.

Grant the user john . doe @ example . com WRITE access to the bucket example-bucket:
gsutil acl ch -u [email protected]:WRITE gs://example-bucket


Grant the group admins @ example . com OWNER access to all jpg files in the top level of example-bucket:
gsutil acl ch -g [email protected]:O gs://example-bucket/*.jpg

Remove any current access by john . doe @ example . com from the bucket example-bucket:

gsutil acl ch -d [email protected] gs://example-bucket
If you have a large number of objects to update, enabling multi-threading with the gsutil -m flag can significantly improve performance. The following command adds OWNER for admin @ example . org using multi-threading:

gsutil -m acl ch -R -u [email protected]:O gs://example-bucket
Grant READ access to everyone from my-domain.org and to all authenticated users, and grant OWNER to admin @ mydomain . org , for the buckets my-bucket and my-other-bucket, with multi-threading enabled:

gsutil -m acl ch -R -g my-domain.org:R -g AllAuth:R \
  -u [email protected]:O gs://my-bucket/ gs://my-other-bucket


See also

Advertising: