Difference between revisions of "Gsutil acl ch"

From wikieduonline
Jump to navigation Jump to search
Line 5: Line 5:
 
== Entities ==
 
== Entities ==
 
There are four different entity types: <code>[[Users]], [[Groups]], [[All Authenticated Users]]</code>, and <code>[[All Users]]</code>.
 
There are four different entity types: <code>[[Users]], [[Groups]], [[All Authenticated Users]]</code>, and <code>[[All Users]]</code>.
 
+
Notes:
 +
* [[Service Accounts]] are considered to be users
  
 
Options:
 
Options:
 
* <code>-R, -r</code> Performs "acl set" request recursively, to all objects under the specified URL.
 
* <code>-R, -r</code> Performs "acl set" request recursively, to all objects under the specified URL.
 
* <code>-d, -f, -g, -p, -u </code>
 
* <code>-d, -f, -g, -p, -u </code>
 
  
 
== Examples ==
 
== Examples ==

Revision as of 08:51, 3 August 2022

gsutil acl ch 

Entities

There are four different entity types: Users, Groups, All Authenticated Users, and All Users. Notes:

Options:

  • -R, -r Performs "acl set" request recursively, to all objects under the specified URL.
  • -d, -f, -g, -p, -u

Examples

  • gsutil acl ch -u AllUsers:R gs://example-bucket/example-object

Grant anyone on the internet WRITE access to the bucket example-bucket:

Grant the group OWNER access to all jpg files in 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 all users from the G Suite domain my-domain.org READ access to the bucket gcs.my-domain.org:

  • gsutil acl ch -g my-domain.org:R gs://gcs.my-domain.org

Remove any current access by [email protected] from the bucket example-bucket:

Ch Roles

  • R: READ
  • W: WRITE
  • O: OWNER

See also

Advertising: