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 652
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

6 REPLIES 6

Hi @gradientopt,

Welcome to Google Cloud Community!

For us to mount a bucket and allow others to access the mount point, we need to run the command  mount as root with the option -o allow_other. Your code should look like this:

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

You may check this documentation on controlling access permissions to the mount point for additional information.

If the aforementioned step didn't work, you may file this as a bug through issue tracking system and product feature requests or through GCSFuse issue link so that our engineers could take a look at this. We don't have a specific ETA for this however you can keep track of its progress once the ticket has been created.

Hope this helps.

Carlos' response does not help, we have the same issue. Read works but writing is not possible without sudo.

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.

This is the correct answer.

Thank you! This works

many thank i adjust some command likely this it's work too


gcsfuse -o allow_other --dir-mode 777 --file-mode 777 my-bucket /path/to/mount/point