
Answer-first summary for fast verification
Answer: Execute the command `gsutil iam ch allUsers:objectViewer gs://bucket-name`.
The correct answer is D because making a bucket public involves granting the Storage Object Viewer access to `allUsers`. This method is straightforward and recommended for sharing static web assets. - **Option A** is incorrect as there is no 'make public' checkbox in the GCP Console for buckets. - **Option B** is incorrect because `allAuthenticatedUsers` does not make the bucket public to everyone; it only includes authenticated users. - **Option C** is incorrect as there is no `make-public` command in `gsutil`. For more details, refer to the GCP documentation on Cloud Storage for sharing files publicly.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
To host static web assets including HTML pages, JavaScript files, and CSS in a Cloud Storage bucket, how can you make the bucket publicly accessible?
A
Use the GCP Console to check a 'make public' box for the bucket.
B
Execute the command gsutil iam ch allAuthenticatedUsers:objectViewer gs://bucket-name.
C
Run the command gsutil make-public gs://bucket-name.
D
Execute the command gsutil iam ch allUsers:objectViewer gs://bucket-name.
No comments yet.