How can I share a folder from a bucket (not entire bucket) with some users in Google Cloud Storage?
You can use gsutil to recursively apply an ACL to a prefix in your bucket. For example, using the acl ch command:
gsutil -m acl ch -r -u [email protected]:READ gs://bucket/prefix/
Note that new objects will not have the ACL applied. If you use a separate bucket, you could set the default object ACL of the bucket to contain your desired ACL, but default ACL's apply to the entire bucket. There is no way to set a default ACL for a specific prefix of the bucket.
Unfortunately you cannot share a folder. As explained in Google's documentation, folders do not really exist in Cloud Storage. It is only a convenient way to display files that contain "/".
As a consequence, you cannot set a permissions for folders.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With