Difference between revisions of "Gsutil acl get"

From wikieduonline
Jump to navigation Jump to search
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
 +
<code>[[gsutil acl get]]</code> command gets the ACL text for a [[bucket]] or [[object]], which you can save and edit for the acl set command.
 +
https://cloud.google.com/storage/docs/gsutil/commands/acl#get
  
 
  [[gsutil acl]] get gs://your-bucket/
 
  [[gsutil acl]] get gs://your-bucket/
  [[AccessDeniedException]]: [[403 Access denied]].
+
  for BUCKET in $(gsutil ls); do echo $BUCKET; [[gsutil acl]] get $BUCKET; done
 +
 
 +
[[gsutil acl]] get gs://your-bucket/
 +
[]
 +
 
 +
[[gsutil acl]] get gs://your-bucket/your-folder/
 +
[[CommandException: No URLs matched]]
 +
 
 +
[[gsutil acl]] get gs://your-bucket/*
 +
[[CommandException]]: gs://your-bucket/* matched more than one URL, which is not allowed by the acl command
 +
 
 +
 
 +
[[gsutil acl]] get gs://your-bucket/
 +
BadRequestException: 400 Cannot get legacy ACL for a bucket that has [[uniform bucket-level access]]. Read more at  https://cloud.google.com/storage/docs/uniform-bucket-level-access
 +
 
  
 
  gsutil acl get
 
  gsutil acl get
Line 18: Line 34:
 
     -d <id>|<email>|<domain>|All|AllAuth|(viewers|editors|owners)-<project number>
 
     -d <id>|<email>|<domain>|All|AllAuth|(viewers|editors|owners)-<project number>
  
 +
== Errors ==
 +
[[gsutil acl]] get gs://your-bucket/
 +
[[AccessDeniedException]]: [[403 Access denied]].
  
 
+
== Related ==
For additional help run:
+
* <code>[[gsutil help acl]]</code>
  [[gsutil help acl]]
 
 
 
  
 
== See also ==
 
== See also ==

Latest revision as of 08:39, 3 August 2022

gsutil acl get command gets the ACL text for a bucket or object, which you can save and edit for the acl set command. https://cloud.google.com/storage/docs/gsutil/commands/acl#get

gsutil acl get gs://your-bucket/
for BUCKET in $(gsutil ls); do echo $BUCKET; gsutil acl get $BUCKET; done
gsutil acl get gs://your-bucket/
[]
gsutil acl get gs://your-bucket/your-folder/
CommandException: No URLs matched
gsutil acl get gs://your-bucket/*
CommandException: gs://your-bucket/* matched more than one URL, which is not allowed by the acl command


gsutil acl get gs://your-bucket/
BadRequestException: 400 Cannot get legacy ACL for a bucket that has uniform bucket-level access. Read more at  https://cloud.google.com/storage/docs/uniform-bucket-level-access


gsutil acl get
CommandException: The acl command requires at least 2 arguments. Usage:

 gsutil acl set [-f] [-r] [-a] <file-or-canned_acl_name> url...
 gsutil acl get url
 gsutil acl ch [-f] [-r] <grant>... url...

 where each <grant> is one of the following forms:

   -u <id>|<email>:<permission>
   -g <id>|<email>|<domain>|All|AllAuth:<permission>
   -p (viewers|editors|owners)-<project number>:<permission>
   -d <id>|<email>|<domain>|All|AllAuth|(viewers|editors|owners)-<project number>

Errors[edit]

gsutil acl get gs://your-bucket/
AccessDeniedException: 403 Access denied.

Related[edit]

See also[edit]

Advertising: