gsutil cors set command returns 403 AccessDeniedException

荒凉一梦 提交于 2019-12-01 18:58:35

I'm answering my question because I found the solution for this issue. I hope this helps anyone else who runs into this, because at the time there was little info on the web describing to how to solve this.

It turns out that my user account did not have "owner" access to the bucket. Here are the steps I took to grant myself access:

1) First, navigate to your project's Cloud Storage Browser in the Developer Console.

2) Once you see a listing of the buckets that are linked to your project, check the box next to the bucket(s) you'd like to modify the permissions for and then click the "Bucket Permissions" button.

3) Next, add your user account to the list of permitted users. Set the permission level to "owner". Click the "Save" button when you're done.

You should have access to the bucket now, which means you won't run into any 403 errors. If you are, you did not set the entity correctly or are using a different account when you authenticated with gsutil. Double-check your work and try again.

Just providing another tip in case others find themselves in the same situation I did. Make sure to log in with the correct google account using gcloud auth login. This can be a tricky detail if there are multiple Google accounts.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!