云存储与云数据库的权限管理及特性解析
1. 授予对象读取权限
在拥有一个组之后,可授予其对对象的读取权限。具体操作步骤如下:
1. 恢复私有预定义访问控制列表(ACL)。
2. 使用 gsutil acl ch 命令有选择地为该组添加读取权限。
示例代码如下:
test-vm$ gsutil acl set private gs://gce-oreilly-example/hello
Setting ACL on gs://gce-oreilly-example/hello...
test-vm$ gsutil acl ch -g gce-oreilly-example@googlegroups.com:r \
gs://gce-oreilly-example/hello
Updated ACL on gs://gce-oreilly-example/hello
test-vm$ gsutil acl get gs://gce-oreilly-example/hello
[
{
"entity": "user-00b4[..]145f",
"entityId": "00b4[..]145f",
"role": "OWNER"
},
{
"email": "gce-oreilly-example@googlegroups.com",
"entity": "group-gce-oreilly-example@googlegroups.com",
"role": "READER"
}
]
超级会员免费看
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



