lighttpd: create user http and run as http by default

Signed-off-by: W. Michael Petullo <mike@flyn.org>
This commit is contained in:
W. Michael Petullo 2014-09-21 17:33:47 -04:00
parent 4ec9d99303
commit a0885f117e
2 changed files with 7 additions and 3 deletions

View File

@ -13,8 +13,8 @@ server.document-root = "/www"
server.upload-dirs = ( "/tmp" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
#server.username = "www-data"
#server.groupname = "www-data"
server.username = "http"
server.groupname = "www-data"
#server.tag = "lighttpd"
#server.errorlog-use-syslog = "enable"
#server.network-backend = "write"

View File

@ -6,7 +6,11 @@ SERVICE_USE_PID=1
START=50
start() {
mkdir -m 0755 -p /var/log/lighttpd
user_exists http || user_add http
[ -d /var/log/lighttpd ] || {
mkdir -m 0775 -p /var/log/lighttpd
chgrp www-data /var/log/lighttpd
}
service_start /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
}