gsutil iam ch user:alex@example.com:objectViewer gs://my-bucket

Category: Google Cloud & Workspace

gsutil iam ch user:alex@example.com:objectViewer gs://my-bucket

Grant a user an IAM role on a bucket

Gives alex@example.com the objectViewer IAM role on my-bucket, letting them list and read objects there; common roles are objectViewer, objectAdmin and storageAdmin. IAM is the modern access-control system and is more flexible than legacy ACLs. Revoke with gsutil iam ch -d user:alex@example.com:objectViewer gs://my-bucket.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.