Making Data Public – Google Cloud

EUROPE IT OUTSOURCING

MARKETING, DESIGN & DEVELOPMENT COMPANY

Making Data Public – Google Cloud

Marketing & Design Blog

Making Data Public – Google Cloud

To make all file public in Google Cloud it’s best to use this domain.

Use this command better:

gsutil acl ch -r -u AllUsers: R gs://bucket -name

Making individual objects publicly readable

To make individual objects publicly readable:

Console

  1. Open the Cloud Storage browser in the Google Cloud Platform Console.
    Open the Cloud Storage browser
  2. In the list of buckets, click on the name of the bucket that contains the object you want to make public, and navigate to the object if it’s in a subdirectory.
  3. Click the drop-down menu associated with the object that you want to make public.

The drop-down menu appears as three vertical dots to the far right of the object’s row.

  • Select Edit permissions from the drop-down menu.
  • In the overlay that appears, click the + Add item button.
  • Add a permission for allUsers.
  1. Select User for the Entity.
  2. Enter all Users for the Name.
  3. Select Reader for the Access.
  4. Click Save.

Once shared publicly, a link icon appears in the public access column. You can click on this icon to get the URL for the object.

gsutil

Use the gsutil acl ch command, replacing [VALUES_IN_BRACKETS] with the appropriate values:

gsutil acl ch -u AllUsers:R gs://[BUCKET_NAME]/[OBJECT_NAME]

If successful, the response looks like the following example:

Updated ACL on gs://[BUCKET_NAME]/[OBJECT_NAME]

Making groups of objects publicly readable

To make all objects in a bucket publicly readable:

Console

  1. Open the Cloud Storage browser in the Google Cloud Platform Console.
    Open the Cloud Storage browser
  2. In the list of buckets, click on the name of the bucket that you want to make public.
  3. Select the Permissions tab near the top of the page.
  4. Click the Add members button.

The Add members dialog box appears.

  • In the Members field, enter allUsers.
  • In the Roles drop down, select the Storage sub-menu, and click the Storage Object Viewer option.
  • Click Add.

Once shared publicly, a link icon appears for each object in the public access column. You can click on this icon to get the URL for the object.

gsutil

Use the gsutil iam ch command, replacing [VALUES_IN_BRACKETS] with the appropriate values:

gsutil iam ch allUsers:objectViewer gs://[BUCKET_NAME]

You would also be interested in Setting up SSL for Google Cloud Storage Static Website

Resources:

cloud.google.com
stackoverflow.com

Stay up to date with our free guides, tips, and exclusive offers