문제

My google app engine application refers images in a storage bucket. I uploaded them using the Developer Console. Right now when I load my application and error occurs.

Fatal error: Uncaught exception 'google\appengine\api\cloud_storage\CloudStorageException' with message 'Access denied to image.' in ...

I can fix this error by changing the "All Authenticated Users" for each object using the Developer Console. Practically this is a time consuming job since I have lot of images in my bucket.

Is there a way to set "All authenticated user" permission for all the objects in my storage bucket through gsutil?

도움이 되었습니까?

해결책

Yes it's possible, you can use something like this:

gsutil -m acl ch -R -g AllAuth:R gs://my-bucket/

For more information : DOCUMENTATION

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top