Your message dated Tue, 24 Mar 2020 11:31:49 -0400
with message-id <20200324153149.GB860795@xps13>
and subject line 715205-done
has caused the Debian Bug report #715205,
regarding [lighttpd]: Running lighttpd as another user
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
715205: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=715205
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
wontfix

lighttpd can be run as any user if the necessary directories are set up.

The Debian package provides a template and runs as user www-data.

If you would like something different and do not want to interfere with
the Debian package for lighttpd, then clone and modify the init script
and the systemd unit, and customize as necessary, e.g. create something
like 'lighttpd-custom'.  Most of this is one-time create of directories
with proper ownership.  The init script will probably have to create
/run/lighttpd-custom each time the init script is run, since /run is in
tmpfs and does not persist across boots.

--- End Message ---

Reply via email to