1

I am having a simple permissions issue that the solution, or proper setup is eluding me.

I have two servers sitting side by side on the same network. .80 is the web server and .40 is a file server. I am trying to mount a directory that lies on .40 onto .80 and serve as web content (only images). My mount is successful, and I can navigate the remote directory just fine, as well as add and remove items from it. But when images viewed in browser, I get 403 Forbidden or in layman's -- Permission Denied

The remote directory on .40 looks like this:

drwxrwxrwx 2 zak zak 4.0K Sep 26 10:36 images

The local directory on .80 looks like this (prior to mount):

drwxrwxrwx 1 zak zak 4.0K Sep 26 10:36 images

I am using a Private Key to auto mount this directory on boot --

sshfs zak@x.x.x.40:/Private/images /var/www/zak_site/images

Why am I able to navigate, add and remove from this mount, but I cannot view via http?

UPDATE

Apache Error Log:

[Thu Sep 26 11:29:04.607441 2019] [core:error] [pid 10718] (13)Permission denied: [client 174.31.53.188:58857] AH00035: access to /images/hawks2.png denied (filesystem path '/var/www/zak_site/images') because search permissions are missing on a component of the path


note I will be needing to be able to upload via http as well once I get the permissions straight. But if I have that issue .. I'll ask a separated question.

0

OK there were TWO components that helped solve this.

1) I set user_allow_other in /etc/fuse.conf

However that was not enough .. After reading -man I saw the option flag -o allow_other on the mount command. This allows Apache to see and change the files without being a "user" specified in the permissions.

2) So I changed the command to:

sshfs -o allow_other zak@10.2.6.40:/Private/images /var/www/zak_site/images

All is well with Apache displaying my images now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.