> Changing the value of 'server.username' in lighttpd.conf causes the > server to fail to start. In my particular configuration, with webdav > enabled, I get the following error: > > Starting Lighttpd Daemon... > (mod_webdav.c.1153) sqlite3_open() > '/var/cache/lighttpd/lighttpd.webdav.db': unable to open database file > (server.c.1496) Configuration of plugins failed. Going down. > lighttpd.service: Control process exited, code=exited, status=255/EXCEPTION > lighttpd.service: Failed with result 'exit-code'. > Failed to start Lighttpd Daemon. > > > This happens because the user/group of 'www-data' is hard-coded in > /usr/lib/tmpfiles.d/lighttpd.tmpfile.conf
Perhaps you should not change server.username unless you are also prepared to change other scripts and filesystem ownership as appropriate? What are you suggesting that lighttpd do in response to your *manual* modification? The Debian installation provides a working set of defaults, which includes running lighttpd under user www-data, and includes scripts which manage temporary files, upload directories, databases and cache locations, such as the mod_webdav sqlite database. If you have different needs, there is nothing that requires you to use the lighttpd service provided by Debian. You can create your own service with your own configuration, and can run it under a different user account. This custom service can run independently and concurrently with the Debian-provided /etc/lighttpd/lighttpd.conf (as long as each instance used different IP's and ports) Case in point, I often recommend spinning a test environment up as a non-privileged, non-production user with lighttpd listening on localhost (i.e. not a public IP and port).