如何找到Google Cloud Storage对象的所有者 [英] How do I find the owner of a Google Cloud Storage object

查看:102
本文介绍了如何找到Google Cloud Storage对象的所有者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的App Engine由服务帐户运行.它将文件写入存储桶.如何将服务帐户视为文件对象的所有者?

My App Engine is run by a service account. It writes files to a bucket. How can I see the service account as owner of the file objects?

推荐答案

您可以使用

You can use the gsutil ls command with the -L option:

gsutil ls -L gs://your-bucket/your-object

这将打印对对象具有权限的实体.其中之一将是创建对象的服务帐户:

This will print the entities which have permissions on the object. One of them will be the service account which created the object:

{

电子邮件":"your-service-account@appspot.gserviceaccount.com",

"email": "your-service-account@appspot.gserviceaccount.com",

实体":"user-your-service-account@appspot.gserviceaccount.com",

"entity": "user-your-service-account@appspot.gserviceaccount.com",

角色":"OWNER"
}

"role": "OWNER"
}

如果您单击对象右侧的3个点,然后在存储桶"页面的控制台中单击编辑权限",则点击

您将看到相同的实体.

Also from the console in the bucket's page if you click on the 3 dots at the right side of the object and "edit permissions" you will see the same entitites.

这篇关于如何找到Google Cloud Storage对象的所有者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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