gcsfuse does not allow others to write

Hi Team, I mounted a bucket onto a local path using the following command found in the tutorial (https://cloud.google.com/storage/docs/gcsfuse-mount 

gcsfuse -o allow_other my-bucket /path/to/mount/point 

I ran this command as user A. However, user B are able to read from/path/to/mount/point but not write to it.  They got the error 

 

 

touch: cannot touch '/path/to/mount/point/foo.txt': Permission denied

 

 

  I did 

 

 

 chmod -R a+w /path/to/mount/point

 

 

 but it still does not help.  How can I resolve that? Thanks!  

A bit of extra context:  if user B did the above instead, they can write to it but this time user A could not write to it but only read from it.

Solved Solved
4 6 742
1 ACCEPTED SOLUTION

Hi All,

if you want the bucket to be read and/or writable by everyone, you can specify the desired chmod numerical format for file-mode and dir-mode, for example:

mount -t gcsfuse -o allow_other,file_mode=777,dir_mode=777 my-bucket /path/to/mount/point

This would set chmod 777 for files and directories and can be adapted as desired.

Hope this helps.

View solution in original post