0

I'm able to mount my Google Cloud Storage with gcsfuse but I need nginx to write in it. How do I do that? I've added nginx to the mounting users group and nothing. Probably because the mount has 755 on all folders? Any idea would be appreciated.

Bert

1

2 Answers 2

1
gcsfuse --help
NAME:
   gcsfuse - Mount a GCS bucket locally

USAGE:
   gcsfuse [global options] bucket mountpoint

VERSION:
   0.21.0 (Go version go1.8)

GLOBAL OPTIONS:
   --foreground                 Stay in the foreground after mounting.
   -o value                     Additional system-specific mount options. Be careful!
   --dir-mode value             Permissions bits for directories, in octal. (default: 755)
   --file-mode value            Permission bits for files, in octal. (default: 644)
   --uid value                  UID owner of all inodes. (default: -1)
   --gid value                  GID owner of all inodes. (default: -1)
   --implicit-dirs              Implicitly define directories based on content. Seedocs/semantics.md
   --only-dir value             Mount only the given directory, relative to the bucket root.
   --key-file value             Absolute path to JSON key file for use with GCS. (default: none, Google application default credentials used)
   --limit-bytes-per-sec value  Bandwidth limit for reading data, measured over a 30-second window. (use -1 for no limit) (default: -1)
   --limit-ops-per-sec value    Operations per second limit, measured over a 30-second window (use -1 for no limit) (default: 5)
   --stat-cache-ttl value       How long to cache StatObject results and inode attributes. (default: 1m0s)
   --type-cache-ttl value       How long to cache name -> file/dir mappings in directory inodes. (default: 1m0s)
   --temp-dir value             Absolute path to temporary directory for local GCS object copies. (default: system default, likely /tmp)
   --debug_fuse                 Enable fuse-related debugging output.
   --debug_gcs                  Print GCS request and timing information.
   --debug_http                 Dump HTTP requests and responses to/from GCS.
   --debug_invariants           Panic when internal invariants are violated.
   --help, -h                   show help
   --version, -v                print the version

Example: gcsfuse --uid=997 --gid=995 --file-mode=755 --dir-mode=755 my-project-3153481321684321681.appspot.com /media/gcloud

1

By default only the user who mounted the file system has access to it. As per the documentation you can use "-o allow_other" to allow other users to access the file system.

gcsfuse also allows you to directly set owners for the inodes using the --uid and --gid flags.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .