简体   繁体   中英

google storage buckets configuration main page

I made a bucket lets call it my bucket. I gave "Legacy Storage Read" to this bucket and it means that it should not list the buckets but if someone knows the URL of specific files or folders inside the buckets they could visit it.

If I enter the only bucket address in URL I get access denied even though, I added index.html ( which is in the root of the bucket) as the main page in the bucket website configuration. Anyone has any idea why the bucket does not routed to index.html if I just go to the bucket URL?

在此处输入图像描述

Have you configured your permision? If this is not the case you can try below steps.
For full details you can refer to this link

  1. In the Google Cloud Console, go to the Cloud Storage Browser page. Go to Browser

  2. Click the Bucket overflow menu () associated with the bucket to which you want to grant a member a role.

  3. Choose Edit bucket permissions.

  4. Click the + Add Members/Principal button.

  5. In the New members field, enter one or more identities that need access to your bucket. If you want to serve your bucket to the public, then type allUsers

  6. Select a role and grant Storage Legacy Object Reader (or roles) from the Select a role drop-down menu. You can check at ( Legacy Role Permision reference ).

  7. Click Save.

Also, below steps is to route your bucket to desired html file.
For full details you can refer to this link Static website examples and tips

  1. In the Google Cloud Console, go to the Cloud Storage Browser page. Go to Browser

  2. In the list of buckets, find the bucket you created.

  3. Click the Bucket overflow menu () associated with the bucket and select Edit website configuration.

  4. In the website configuration dialog, specify the main page and error page.

  5. Click Save.

To learn how to get detailed error information about failed operations in the Cloud Storage browser, see Troubleshooting .

It seems like you are trying to connect directly to the object URL in your bucket.

If your goal is to setup a static website you have to configure the permissions of your bucket so it is accessible to the public and the set up a Load Balancer to serve it.

To configure the permissions for your bucket you can follow the steps here . You can test if they are properly configured by trying to access the object with their URL http://storage.googleapis.com/BUCKET_NAME/OBJECT_NAME , I recommend using a Incognito window to make sure it is accessible for all users.

Once you have configured the permissions you have to configure the Load Balancer, which you can do following this guide. Please note that even though the guide says you need a domain you can test this feature by leaving the "Frontend configuration" as default and connecting directly to the Load Balancer IP address.

The changes to the "Edit website configuration" option in the buckets are applied to the Load Balancer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM