How do I find the owner of a Google Cloud Storage object

家住魔仙堡 提交于 2020-07-23 12:06:47

问题


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?


回答1:


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:

{

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

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

"role": "OWNER"
}

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.



来源:https://stackoverflow.com/questions/55635097/how-do-i-find-the-owner-of-a-google-cloud-storage-object

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