3

I have a google cloud project. In that project. I have a VM instance. I mounted uploads folder with Google Cloud Storage bucket using fuse.

While mounting I get an error like this,

Using mount point: /var/www/html/porject/app/webroot/uploads
Opening GCS connection...
Opening bucket...
Mounting file system...
daemonize.Run: readFromProcess: sub-process: mountWithArgs: mountWithConn: Mount: mount: running fusermount: exit status 1

stderr:
fusermount: mount failed: Operation not permitted

so i use sudo command now i get reponse like this

Using mount point: /var/www/html/4thambit_v7/app/webroot/uploads
Opening GCS connection...
Opening bucket...
Mounting file system...
File system has been successfully mounted.

But i can't access the uploads folder, its showing 403 error (see image.)

ls -l command response like this

drwxrwxrwx.  1 root             root                     0 May  8 13:26 uploads

Anyone knows the correct steps to mount a folder in centos machine with Cloud Storage bucket.? if the gcs mount is successful. it will works similar to the local directory.

2 Answers2

1

This sounds like a permission error. I would suggest running gcsfuse including the --foreground and --debug_fuse options to see the full error.

Since you seems to have mounted the file system as root, the user accessing the file/folder doesn't have the permission to do so, as explained in this documentation.

You can use gcloud auth login(link) to login with your Google account and mount the file system after this command.

london_utku
  • 103
  • 3
Jean
  • 31
  • 4
0

Default GCSFUSE is READONLY, for Read/write should key json file:

  1. Create json key for service account: https://console.cloud.google.com/iam-admin/serviceaccounts/details/

  2. Upload your json file to server

  3. Run gcsfuse like:

    gcsfuse --key-file="/path/to/key-4c8e254b9365.json" bucket_name_path /path/to/mount/bucket
    
MLu
  • 23,798
  • 5
  • 54
  • 81