我有一个CentoOS 6服务器,其目录通过我的 Mac 目录中的sshfs挂载:
sshfs -o allow_other dmitri@10.211.55.2:/Users/dmitri/Sites /var/www/html
但是当我尝试启动 lighttpd 服务器时,出现错误:
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 用户是lighttpd,但是当我切换到用户 lighttpd 时:
su lighttpd -s /bin/bash
我可以读取挂载目录中的任何文件:
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"
...
我不明白为什么会发生这种情况以及如何使 lighttpd 工作。
PS(mb它会很有用):
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