4
votes

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

1 Answers

7
votes

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