在我的云存储分区上丢失了权限,如何重置它们? [英] lost permission on my cloud storage bucket, how to reset them?

查看:46
本文介绍了在我的云存储分区上丢失了权限,如何重置它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行了gsutil.py acl set -R公开阅读的gs://dsa-assets现在我看到它覆盖了每个用户的权限,并且我无法上传新文件,甚至无法删除该存储桶.如何重置存储桶的权限或删除该存储桶?

I ran gsutil.py acl set -R public-read gs://dsa-assets and now I see that it override every users permission and I can't upload new file or even delete this bucket. What can I do to reset permission on my bucket or to delete this bucket ?

推荐答案

gsutil acl set -R public-gs://bucketName 将设置bucketName及其内部的所有对象的ACL罐头ACL public-read 的bucketName.此ACL授予所有用户对存储桶和对象的读取访问权限,并将FULL_CONTROL授予存储桶或对象所有者.

gsutil acl set -R public-read gs://bucketName will set the ACL for bucketName and all of the objects inside of bucketName to the canned ACL public-read. This ACL grants all users read access to the bucket and objects, and it grants FULL_CONTROL to the bucket or object owner.

每个ACL都包含针对存储桶或对象所有者的FULL_CONTROL.存储桶的所有者将始终拥有自己拥有的存储桶的FULL_CONTROL,无论他们如何尝试.

Every ACL includes FULL_CONTROL for the bucket or object owner. The owner of the bucket will always have FULL_CONTROL of the bucket that they own, no matter how they try.

如果发现您无法再将文件上传到存储桶,则可能是您没有在拥有存储桶的帐户中使用gsutil.确定哪个项目拥有存储桶,并确保您的帐户在该项目的所有者组中.

If you find that you can no longer upload files to the bucket, it is likely that you are not using gsutil with an account that owns the bucket. Figure out which project owns the bucket, and make sure that your account is in the owners group of that project.

或者,您可以暂时将用于gsutil的帐户切换为项目所有者.最简单的方法是使用 BOTO_CONFIG 环境变量来控制多个配置文件:

Alternately, you could switch which account you're using for gsutil to one that is a project owner temporarily. The easiest way to do this is by using the BOTO_CONFIG environment variable to control multiple profiles:

$> BOTO_CONFIG=/home/me/.boto.owner gsutil config
# Follow prompts to set up account, use an account that owns the bucket
$> BOTO_CONFIG=/home/me/.boto.owner gsutil acl ch -u otherAccount@gmail.com:FC
$> gsutil do stuff with original account

这篇关于在我的云存储分区上丢失了权限,如何重置它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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