Upload "public" directory to Google Cloud Storage

1.1k views Asked by At

Using this command from SSH I can upload a whole folder into Google Cloud Storage:

gsutil cp -R folder_big gs://bucket_name

Those are files inside the folder:

enter image description here

I don't want to click individually on each file to make it public.

How do I make the folder (and all files inside) automatically public on upload?

1

There are 1 answers

0
Mike Schwartz On BEST ANSWER

You could do:

gsutil cp -a public-read -R folder_big gs://bucket_name

Note: if it's a large folder you would likely get a substantial performance improvement if you use the multi-threading option:

gsutil -m cp -a public-read -R folder_big gs://bucket_name