Difference between revisions of "Gsutil acl set"

From wikieduonline
Jump to navigation Jump to search
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
[[gsutil acl]] set
+
https://cloud.google.com/storage/docs/gsutil/commands/acl#set
=== Set ===
+
* <code>[[gsutil acl]] set</code>
 +
* <code>[[gsutil acl set private]]</code>
  
The "acl set" command allows you to set an Access Control List on one or more buckets and objects. The file-or-canned_acl_name parameter names either a canned ACL or the path to a file that contains ACL text. The simplest way to use the "acl set" command is to specify one of the canned ACLs, e.g.,:
 
  
* <code>gsutil acl set private gs://bucket</code>
+
== Related ==
 
+
* [[Predefined ACLs]]
If you want to make an object or bucket publicly readable or writable, it is recommended to use "acl ch", to avoid accidentally removing OWNER permissions. See the "acl ch" section for details.
+
* <code>[[gsutil acl get]]</code>
 
+
* <code>[[gsutil ubla set]]</code>
See Predefined ACLs for a list of canned ACLs.
+
* <code>[[gsutil acl ch]]</code>
 
 
If you want to define more fine-grained control over your data, you can retrieve an ACL using the "acl get" command, save the output to a file, edit the file, and then use the "acl set" command to set that ACL on the buckets and/or objects. For example:
 
 
 
 
 
* <code>gsutil acl get gs://bucket/file.txt > acl.txt</code>
 
 
 
[[gsutil acl set private]]
 
  
 
== See also ==
 
== See also ==

Latest revision as of 18:10, 3 August 2022

Advertising: