最佳答案
我通过 SSH 登录到一个 GCE 实例。从那里,我想访问存储与服务帐户的帮助:
GCE> gcloud auth list
Credentialed accounts:
- 1234567890-compute@developer.gserviceaccount.com (active)
I first made sure that this Service account is flagged "Can edit" in the permissions of the project I am working in. I also made sure to give him the Write ACL on the bucket I would like him to copy a file:
local> gsutil acl ch -u 1234567890-compute@developer.gserviceaccount.com:W gs://mybucket
但接下来的命令失败了:
GCE> gsutil cp test.txt gs://mybucket/logs
(我还确保在“ mybucket”下创建了“ log”)。
我得到的错误消息是:
Copying file://test.txt [Content-Type=text/plain]...
AccessDeniedException: 403 Insufficient Permission 0 B
我错过了什么?