chmod 777 is not changing the permissions to 777

gcsfuse sets file and directory permissions when mounting. Specifically, the options are:

  • file_mode – Permission bits for files, in octal
  • dir_mode – Permissions bits for directories, in octal

Source: https://github.com/GoogleCloudPlatform/gcsfuse/blob/e0a0e0826897b09581c24065fb6a92912ee79d03/flags.go#L78

If you do not specify the options, the defaults are dir_mode=0755,file_mode=0644.

Source: https://github.com/GoogleCloudPlatform/gcsfuse/blob/e0a0e0826897b09581c24065fb6a92912ee79d03/flags.go#L51

These options apply to all files and directories in the mount. This FUSE file system does not have the capability of changing permissions for specific files or directories, which is why chmod does nothing.


Furthermore, gcsfuse has additional access restrictions that limit access to the user who mounted the file system. Details:

As a security measure, fuse itself restricts file system access to the user who mounted the file system (cf. fuse.txt). For this reason, gcsfuse by default shows all files as owned by the invoking user. Therefore you should invoke gcsfuse as the user that will be using the file system, not as root.

If you know what you are doing, you can override these behaviors with the allow_other mount option supported by fuse and with the --uid and --gid flags supported by gcsfuse. Be careful, this may have security implications!

Source: https://github.com/GoogleCloudPlatform/gcsfuse/blob/d25be2491879e3745c3ed3d8e816774defc1cc5c/docs/mounting.md#access-permissions

This is why you aren't able to access the mount from another user. To allow other users to access the mount, specify allow_other in your mount options.


I was able to solve the problem in the following way: I had to go to Cloud API Access Scopes and verify under the VM configuration that it has read write or full access for storage. This involved pressing edit on the gcloud console which lists my instances. At the bottom of the page, there was the limitation for storage which I changed to 'full'. That did it.