0 votes
1 view
in GCP by (18.3k points)
edited by

I am trying to allow anonymously (or just from my applications domain) to read access for files in my bucket.

When trying to read the files I get

```

<Error>

    <Code>AccessDenied</Code>

    <Message>Access denied.</Message>

    <Details>

        Anonymous users does not have storage.objects.get access to object.

    </Details>

</Error>

 ```

I also tried to add a domain with the object default permissions dialog in the google cloud console. that gives me the error "One of your permissions is invalid. Make sure that you enter an authorized id or email for the groups and users and a domain for the domains"

I have also looked into making the ACL for the bucket public-read. My only problem with this is that it removes my ownership over the bucket. I need to have that ownership since I want to allow uploading from a specific Google Access Id.

1 Answer

+1 vote
by (48.8k points)

Follow the following steps:

8.Once shared publicly, a link is generated and the link icon appears in the public 
  1. Firstly, click on the Cloud Storage option in the Google Cloud Platform Console.

  2. Among all the buckets in the list, you need to click on the name of the bucket that contains the object you want to make as public(i.e. visible to the public) and then navigate to the object if it's in a subdirectory.

  3. Click the drop-down menu associated with the object that you want to make public.

  4. The drop-down menu appears as three vertical dots to the far right of the object's row.

  5. Select Edit Permissions from the drop-down menu.

  6. Then click on the + Add item button.

  7. Add permission for all users.

    1. Select User for the Entity.

    2. Enter all users for the Name.

    3. Select Reader for the Access.

    4. Click Save. 

access column. You may click on this icon to get the URL for the object.

    ...