0

I'm trying to set up a Lighttpd webserver with PHP support. I have basically followed the instructions in this article, but after restarting the server (though I did not receive an error message and systemctl status lighttpd.service claims it's running), the server is not responding.

In /var/log/lighttpd/error.log it says

(mod_fastcgi.c.978) bind failed for: unix:/var/lib/lighttpd/sockets/php-fastcgi-1.socket-0 Permission denied

Which is, itself a straight forward message, apparently the server is lacking the rights to access the var/lib/lighttpd/sockets directory. However, I did change the ownership of the directory (recursively) to lighttpd:lighttpd and ls -al /var/lib/lighttpd gives me this:

drwxr-xr-x.  3 lighttpd lighttpd 4096 Mar 13 17:12 .
drwxr-xr-x. 42 root     root     4096 Mar 13 17:10 ..
drwxr-xr-x.  2 lighttpd lighttpd 4096 Mar 13 17:12 sockets

So it looks like that worked and the server should have all the necessary permissions. Is there something here I am not seeing?

1 Answer 1

1

Looks like an SELinux issue. You could temporarily disable SELinux and test this theory. Try executing on the command line

sudo echo 0 >/selinux/enforce

and then restart lighttpd. See if it works. If it doesn't work, it isn't an SELinux issue. Reboot the machine to re-enable SELinux or execute:

sudo echo 1 >/selinux/enforce

If it does fix it, you can disable SELinux or set it to permissive to solve the issue permanently like so:

Edit /etc/selinux/config and set

SELINUX=enforcing 

to

SELINUX=permissive

and then reboot. Do not set SELinux to disabled as this might cause trouble when you wish to re-activate SELinux later.

1
  • @nijansen You're very welcome!
    – Pylsa
    Mar 13, 2012 at 20:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .