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.

4 Likes

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.

1 Like

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

1 Like

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.

2 Likes

This is the correct answer.

2 Likes

Thank you! This works

1 Like

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
4 Likes