Making Data Public – Google Cloud

Author avatar wrote on 16/01/2019

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:

Google Cloud 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 allUsers 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]

Read about LinkedIn Membership Types & Features

Resources:

cloud.google.com
stackoverflow.com

-->
We stand with Ukraine