From: W. Michael Petullo Date: Sun, 21 Sep 2014 21:33:47 +0000 (-0400) Subject: lighttpd: create user http and run as http by default X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=a0885f117ef945787b0d0572572d8798fdcb3268;p=openwrt-packages.git lighttpd: create user http and run as http by default Signed-off-by: W. Michael Petullo --- diff --git a/net/lighttpd/files/lighttpd.conf b/net/lighttpd/files/lighttpd.conf index 378e32ae1..a52d08f6d 100644 --- a/net/lighttpd/files/lighttpd.conf +++ b/net/lighttpd/files/lighttpd.conf @@ -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" diff --git a/net/lighttpd/files/lighttpd.init b/net/lighttpd/files/lighttpd.init index d73a5da98..936c7f6c7 100644 --- a/net/lighttpd/files/lighttpd.init +++ b/net/lighttpd/files/lighttpd.init @@ -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 }