Mount GCS as apache Document Root

406 views
Skip to first unread message

Rupesh kumar

unread,
Aug 8, 2016, 2:14:43 AM8/8/16
to gce-discussion
Hi Team,

I mounted google cloud storage bucket as my apache document root using gscfuse tool, it mounted successfully file read/write happening with no issue.
I'm facing problem that when i access my website it showing 403 forbidden error in my apache access and error logs. even i also tried and mount bucket using apache uid n gid same problem coming.

George (Google Cloud Support)

unread,
Aug 9, 2016, 7:50:28 PM8/9/16
to gce-discussion
Hello Rupesh,

To troubleshoot the issue, you can run gcsfuse with --gcs.debug which can provide you more information about the operations. Did you try overriding the the user who mounted the file system using the"allow_other" mount option? 

For future reference, this question is better suited on ServerFault with the relevant tags, where community and Google Engineers are active as well.

I hope this helps.

Sincerely,
George

Rupesh kumar

unread,
Aug 10, 2016, 3:55:56 AM8/10/16
to gce-discussion
HI George,

I tried multiple options to mount but still facing same issue. mount option like --debug_fuse  --debug_gcs  --debug_http --dir-mode "755" --file-mode "644" --uid "-1"  --gid "-1"  .  

George (Google Cloud Support)

unread,
Aug 10, 2016, 4:56:31 PM8/10/16
to gce-discussion
Hello Rupesh,

As mentioned in this github link, " 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. You can override these behaviors with the allow_other mount option supported by fuse "

Did you have the chance to override using the allow_other mount option?

I hope this helps.

Sincerely,
George
Reply all
Reply to author
Forward
0 new messages