gsutil cors set命令返回403 AccessDeniedException [英] gsutil cors set command returns 403 AccessDeniedException

查看:202
本文介绍了gsutil cors set命令返回403 AccessDeniedException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循这些说明

a>关于如何在Google云端存储分区上设置CORS配置,以及何时运行 gsutil cors set 命令,它会返回以下错误消息:


AccessDeniedException:403存储桶的帐户已被禁用。

为了记录,我可以访问存储桶。我在Developer Console中拥有此项目的所有者权限。运行 gsutil cp gsutil ls 工作得很好。

有什么想法可能是错误的吗?

解决方案

我正在回答我的问题,因为我找到了解决方案这个问题。我希望这可以帮助任何遇到这种情况的人,因为当时网上很少有人描述如何解决这个问题。



我的用户帐户没有所有者权限。以下是我为自己授予访问权所采取的步骤:首先,请在开发者控制台中导航到您项目的Cloud Storage Browser。



2)一旦您看到链接到您项目的桶列表,请选中您要修改权限的桶旁边的复选框,然后单击桶权限按钮。



>

3)接下来,将您的用户帐户添加到允许的用户列表中。将权限级别设置为所有者。完成后点击保存按钮。





现在您应该可以访问存储桶,这意味着您不会遇到任何403错误。如果是的话,那么当您使用gsutil进行身份验证时,您没有正确设置实体或正在使用其他帐户。仔细检查您的工作,然后重试。


I'm following these instructions on how to set a CORS configuration on a Google Cloud Storage bucket and when I run the gsutil cors set command it returns the following error message:

AccessDeniedException: 403 The account for bucket "[REDACTED]" has been disabled.

For the record, I have access to the bucket. I have owner privileges for this project in the Developer Console. Running gsutil cp and gsutil ls work just fine.

Any ideas on what might be wrong here?

解决方案

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.

这篇关于gsutil cors set命令返回403 AccessDeniedException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆