Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Oauth Google云存储为ACL中存在的用户返回403_Oauth_Google Cloud Platform_Google Cloud Storage - Fatal编程技术网

Oauth Google云存储为ACL中存在的用户返回403

Oauth Google云存储为ACL中存在的用户返回403,oauth,google-cloud-platform,google-cloud-storage,Oauth,Google Cloud Platform,Google Cloud Storage,我有一个谷歌云存储桶,我想给个人用户访问个人文件的权限。因此,我有一个uri为:gs://my bucket/my file的文件,在该对象的ACL列表中,我有myuser@gmail.com列为具有“读取”权限的“用户” 但是,使用url访问该文件的任何尝试: https://storage.cloud.google.com/my-bucket/myfile通过浏览器返回一个短页面,说明403禁止,即使我已登录。如果我打开“匿名”选项卡,当我转到该URL时,系统会提示我登录谷歌,但一旦我完成登

我有一个谷歌云存储桶,我想给个人用户访问个人文件的权限。因此,我有一个uri为:
gs://my bucket/my file
的文件,在该对象的ACL列表中,我有
myuser@gmail.com
列为具有“读取”权限的“用户”

但是,使用url访问该文件的任何尝试:
https://storage.cloud.google.com/my-bucket/myfile
通过浏览器返回一个短页面,说明
403禁止
,即使我已登录。如果我打开“匿名”选项卡,当我转到该URL时,系统会提示我登录谷歌,但一旦我完成登录,就会收到相同的
403
消息

使用相同的凭据,我可以使用gsutil或从google开发者控制台轻松下载该文件。但我似乎无法从web链接下载经过身份验证的用户

编辑:明确地说,此对象不是公开的,它应该只对项目所有者/编辑以及对象ACL中指定的任何人可访问。我要把文件弄坏了

EDIT2:这是对象ACL中用户的条目

{
    "email": "myuser@gmail.com",
    "entity": "user-myuser@gmail.com",
    "role": "READER"
 }

您还必须向该用户提供bucket。

我应该赋予他们什么角色,使他们不能访问bucket中的每个文件,只能访问该文件?