I am trying to host a static web page with google. When I go to my domain (i.e.,www.example.com), I receive this error:
<Error>
<Code>AccessDenied</Code>
<Message>Access denied.</Message>
<Details>
Anonymous caller does not have storage.objects.get access to www.example.com/index.html.
</Details>
</Error>
I am using uniform storage. I tried the following command after logging into gsutil with "gcloud auth login" to try to make the bucket public:
gsutil acl ch -u AllUsers:R gs://www.example.com
(I have also tried with a '/' at the end)
These both give me the error:
Failed to set acl for gs://www.example.com/. Please ensure you have OWNER-role access to this resource.
I have also tried the same command with '...gs://www.example.com/* and gs://www.example.com/** at the end. These produce a slightly different error:
Failed to set acl for gs://www.jpdgallery.com/[first file in bucket]. Please ensure you have OWNER-role access to this resource.
The user I am using is the only one on the apps account. That user has the following project rights:
- Owner
- Storage Admin
- Storage Object Admin
- Storage Object Creator
- Storage Object Viewer
The user also has the following bucket rights:
- Storage Admin
- Storage Legacy Bucket Owner
- Storage Legacy Bucket Reader
- Storage Legacy Object Owner
- Storage Legacy Object Reader
- Storage Object Admin
- Storage Object Creator
- Storage Object Viewer
This similar post did not seem to address the issue: