Przeglądaj źródła

[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 <christian.schoenebeck@gmail.com>
chris5560 10 lat temu
rodzic
commit
a909d2d7a2
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2
    1
      net/lighttpd/files/lighttpd.init

+ 2
- 1
net/lighttpd/files/lighttpd.init Wyświetl plik

@@ -6,7 +6,8 @@ SERVICE_USE_PID=1
6 6
 START=50
7 7
 
8 8
 start() {
9
-	mkdir -m 0755 -p /var/log/lighttpd
9
+	[ -d /var/log/lighttpd ] || mkdir -p /var/log/lighttpd
10
+	chmod 0777 /var/log/lighttpd
10 11
 	service_start /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
11 12
 }
12 13