From a909d2d7a27b109eee32c114e41e106d52f4c732 Mon Sep 17 00:00:00 2001 From: chris5560 Date: Wed, 23 Jul 2014 21:50:16 +0200 Subject: [PATCH] [PATCH] lighttpd: errorlog failed as non root user if running as non root user (what's should be the default on web-servers) you get: (log.c.118) opening errorlog '/var/log/lighttpd/server.log' failed: Permission denied Fix: create log directory only if not exist and chmod 777 to allow anyone to write and create files inside default log directory Signed-off-by: Christian Schoenebeck --- net/lighttpd/files/lighttpd.init | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/lighttpd/files/lighttpd.init b/net/lighttpd/files/lighttpd.init index d73a5da98d..b318a023d9 100644 --- a/net/lighttpd/files/lighttpd.init +++ b/net/lighttpd/files/lighttpd.init @@ -6,7 +6,8 @@ SERVICE_USE_PID=1 START=50 start() { - mkdir -m 0755 -p /var/log/lighttpd + [ -d /var/log/lighttpd ] || mkdir -p /var/log/lighttpd + chmod 0777 /var/log/lighttpd service_start /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf }