Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

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




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

share|improve this answer
Great Scott! It works - thanks a bunch – nijansen Mar 13 '12 at 20:49
@nijansen You're very welcome! – BloodPhilia Mar 13 '12 at 20:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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