Google cloud platform GCP实例元数据未通过作用域

Google cloud platform GCP实例元数据未通过作用域,google-cloud-platform,google-cloud-storage,gcsfuse,Google Cloud Platform,Google Cloud Storage,Gcsfuse,我正在尝试使用gcsfuse和服务帐户身份验证装载GCP存储桶。一切正常,但我只有阅读权限,见下文 hannel@gcpxxxxxxd1:~$ gcsfuse --dir-mode 777 --file-mode 777 test /testing Using mount point: /testing Opening GCS connection... Opening bucket... Mounting file system... File system has been successf

我正在尝试使用gcsfuse和服务帐户身份验证装载GCP存储桶。一切正常,但我只有阅读权限,见下文

hannel@gcpxxxxxxd1:~$ gcsfuse --dir-mode 777 --file-mode 777 test /testing
Using mount point: /testing
Opening GCS connection...
Opening bucket...
Mounting file system...
File system has been successfully mounted.
hannel@gcpxxxxxxd1:~$ ls /testing/
Huh...
hannel@gcpxxxxxd1:~$ echo "test" | sudo tee -a /testing/test.log
tee: /testing/test.log: Permission denied
我已确认服务帐户具有写入存储服务的完全存储管理员权限

我已确认实例元数据服务正在获取服务帐户

我看到的唯一问题是,从实例元数据服务调用
scopes
似乎返回了“奇怪”的信息
https://www.googleapis.com/auth/cloud-platform

curl http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/xxxxx-768@xxxx-246521.iam.gserviceaccount.com/scopes -H "Metadata-Flavor: Google"

我真的不想使用密钥JSON解决方案

问题: 这是一个众所周知的问题吗

我做错什么了吗

非常感谢您在这方面提供的任何帮助


它现在正在工作,没有任何更改,我相信问题一定是IAM权限复制。我猜15分钟是不够长的,一个小时似乎就足够了。

转到谷歌云控制台。选择你的虚拟机。在详细信息窗口的底部,您为“云API访问范围”设置了什么?您需要“允许对所有云API的完全访问”,这意味着访问由计算引擎服务帐户控制。计算引擎作用域的默认设置是云存储的“只读”。默认情况下,它设置为完全访问,并在使用自定义服务帐户时由IAM管理。计算引擎默认服务帐户的默认IAM设置为“允许默认访问”。这意味着许多API在范围上是有限的。Hi Channel,很好地找到了解决方案!你能自己回答吗?它将使它更为明显,并在您找到解决方案时帮助有相同问题的人。谢谢@PawelCzuczwara计划这样做。您需要等待一段时间才能将自己的问题标记为已回答。