I've got a CentoOS 6 server with a directory mounted via sshfs from my Mac directory:
sshfs -o allow_other [email protected]:/Users/dmitri/Sites /var/www/html
but when I try to start lighttpd server, I get an error:
Starting lighttpd: 2013-11-20 10:34:43: (configfile.c.989) opening configfile /var/www/html/www.example.ru/public/_engine/lighttpd.conf failed: Permission denied
Lighttpd user is lighttpd, BUT when I'm swithing to user lighttpd:
su lighttpd -s /bin/bash
I can read any files in mounted directory:
bash-4.1$ whoami
lighttpd
bash-4.1$ cat /var/www/html/www.example.ru/public/_engine/lighttpd.conf
server.error-handler-404 = "/zf2.php/404"
...
I can't understand why it happens and how to make lighttpd work.
PS (mb it would be useful):
bash-4.1$ whoami
lighttpd
bash-4.1$ pwd
/var/www/html/www.example.ru/public/_engine
bash-4.1$ ls -lh
-rw-r--r--. 1 501 games 2,3K Ноя 15 09:48 account-pages.php
-rw-r--r--. 1 501 games 23K Ноя 15 09:48 admin-pages.php
The actual troublemaker was SELinux. All the troubles have been solved by disabling it.