2
votes

I have this URL but getting access denied there is any permission required.

https://storage.googleapis.com/BUCKET/Artboard_4.png

Getting this error:

Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object.

1

1 Answers

7
votes

It sounds like you haven't set the bucket permissions to public?

In the console, you can click on "Set bucket permissions" in the bucket's menu. Enter "allUsers" in Add Members and assign Role -> Storage -> Storage Object Viewer.

With gsutil, running gsutil -m acl set -R -a public-read gs://bucket should set access on all files in that bucket to public. To set default permissions on the bucket so that files are public by default when they're added, use gsutil defacl set public-read gs://bucket.