1

I can successfully mount my bucket using the following command

sudo mount -t gcsfuse -o rw,noauto,user,implicit_dirs,allow_other fakebucket thebucket/

I can go into the bucket find the subfolders and etc. however I can't write anything

touch: cannot touch 'aaa': Permission denied

I have tried to use various parameters in the gcsfuse for example rw,noauto,user,implicit_dirs,allow_other - even I tried a regular chmod command after

sudo chmod -R 777 thebucket/

with no error, but the permission has not changed, neither I can write into the bucket.

Thank you in advance,

user702846
  • 123
  • 7

2 Answers2

2

The problem you are having might be because of three things:

-Permissions on the OS after mounting, to solve this mount your bucket with the following command:

sudo mount -t gcsfuse -o implicit_dirs,allow_other,uid=1000,gid=1000 <BUCKET> <PATH>

-Permissions of your service account, to validate this you can go on the consolen to IAM & admin and verify that the service account your VM is using has Storage Admin Role.

-Cloud API Access Scopes: verify under the VM configuration that it has read write or full access for storage.

Soni Sol
  • 231
  • 1
  • 9
  • Cloud API Access Scopes changes worked for me. Default Scopes are not sufficient and need to be broadened. – OrangePot Nov 05 '20 at 19:55
  • when I edit my VM all I see is: "Access scopes Use IAM roles with service accounts to control VM access. Learn more" but there is no button or way of setting the "scopes". how is this to be done? – ekkis Sep 02 '22 at 06:41
0

Look at the scopes of the service account used by the instance, by default the access to Cloud Storage is read only.

javierlga
  • 156
  • 3