There are the following ways to make many files public in Google cloud storage.
- Method 1: Using the gsutil command-line tool
- Method 2: Using the Google Cloud Console
- Method 3: Using client libraries
Method 1: Using the gsutil command-line tool
To make many files public, run the following command,
gsutil -m acl ch -r -u AllUsers:R gs://your_bucket_name/path/to/objects
Replace your_bucket_name with the name of your Cloud Storage bucket and path/to/objects with the path to the objects you want to make public.
You can also use this command to make multiple files public in Google cloud storage.
gsutil -m acl set -R -a public-read gs://bucket
- The -m issues multiple requests at the same time.
- The -R issues a request for every object in your bucket.
- The -a issues requests for every version of every object.
Method 2: Using the Google Cloud Console
- Go to the Google Cloud Console: https://console.cloud.google.com/
- Sign in with your Google account if you haven’t already.
- In the top-right corner of the page, click on the project dropdown menu to select the project containing your Cloud Storage bucket.
- Click on the navigation menu icon (three horizontal lines) in the page’s top-left corner.
- Scroll down to the “Storage” section and click “Browser.”
- Click on the bucket’s name containing the files you want to make public.
- Use the checkboxes to select the files you want to make public.
- Click on the “Edit permissions” button (it looks like a pencil) above the file list.
- In the “Edit object permissions” dialog, click the “Add entry” button.
- In the new row, set “Entity” to “User,” set “Name” to “allUsers,” and set “Access” to “Reader.”
- Click on the “Save” button to apply the changes.
Method 3: Using client libraries
Here’s an example using the Google Cloud Storage client library for Python to make multiple files public.
Step 1: Install the Google Cloud Storage Python library
pip install google-cloud-storage
Step 2: Create a Python script with the following code
from google.cloud import storage
def make_files_public(bucket_name, prefix):
client = storage.Client()
bucket = client.get_bucket(bucket_name)
blobs = bucket.list_blobs(prefix=prefix)
for blob in blobs:
blob.make_public()
print(f"Made all files in {prefix} public.")
# Replace with your bucket name and path to objects
bucket_name = "your_bucket_name"
prefix = "path/to/objects"
make_files_public(bucket_name, prefix)
Replace your_bucket_name with the name of your Cloud Storage bucket and path/to/objects with the path to the objects you want to make public.
Following these steps, you can publicize many files in Google Cloud Storage using the Google Cloud Console, gsutil, or client libraries.
That’s it.

Amit Doshi is a Cloud Engineer who has experienced more than 5 years in AWS, Azure, and Google Cloud. He is an IT professional responsible for designing, implementing, managing, and maintaining cloud computing infrastructure, applications, and services.