mount GCPs buckets with write access

955 views Asked by At

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,

1

There are 1 answers

0
Tux On

Have you checked if your instance has the required API access scopes to write to storage?

By default the access scope to storage is "Read only", this is why you can mount the bucket and list the contents but not write to it.

To edit the scopes you can do it from the web interface, after turning off the instance and editing it or with this command:

gcloud beta compute instances set-scopes INSTANCE_NAME scopes=storage-full

Be sure to add all the scopes you need , the command above will disable all scopes and give you rw access to the storage API.