[pkg-lighttpd] Bug#715205: [lighttpd]: Running lighttpd as another user

Christophe-Marie Duquesne chmd at chmd.fr
Sat Jul 6 22:49:30 UTC 2013


Package: lighttpd
Version: 1.4.31-4

Hi,

I wanted to run lighttpd as a different user (than www-data). I
thought modifying /etc/lighttpd.conf would be the only thing required,
but the package really wants to run lighttpd as www-data:
- The default log dir /var/log/lighttpd is owned by www-data:ww-data.
I had to change the location where lighttpd logs to a file where my
user could write.
- For the sake of coherence, I also changed the pid file location in
/etc/lighttpd.conf. Bad idea! The init script /etc/init.d/lighttpd was
referencing this file and was relying on it for killing lighttpd.
After a while, I understood that modifying the location of this pid
file was the reason why I could not stop lighttpd anymore.
- When I tried to set up lighttpd for php, I discovered that lighttpd
was not able to php, because /var/run/lighttpd/php.socket-0 was not
writable by my user. The cause of this was that the init script was
creating the directory /var/run/lighttpd as owned by
www-data:www-data. I ended up modifying the init script to use my
user/group, but it is not a viable solution regarding future upgrades.

TL;DR It would be nice if the init script was loading the user/group
of lighttpd from a unique config file (the same way it is done for
apache).

Some relevant informations about my system:
$ cat /etc/debian_version
7.1
$ uname -a
Linux chmd.fr 3.8.13-xxxx-grs-ipv6-64 #3 SMP Wed May 29 11:57:43 CEST
2013 x86_64 GNU/Linux

Regards,
Christophe-Marie



More information about the pkg-lighttpd-maintainers mailing list