I recently experienced lighttpd not starting due to a missing directory.
‘/var/log/lighttpd/error.log’ failed: No such file or directory
Creating the lighttpd dir by hand didnt help and resulted in the same error message when trying to restart lighttpd.
I tried reinstalling lighttpd, but to no avail.
How can I help lighttpd to start and run properly? (Running in dietpi 6.30, with pihole, nextcloud and wireguard installed as well)
Not sure if it is a simple setting somewhere or something more complex which ist beyond my capabilities.
Maybe there anyway to reinstall dietpi as a while (to get back default settings of installed software) without starting from scratch?
many thanks for your report. Maybe you have incorrect permission on the folder. Pls can you post following
ls -la /var/log/
Thanks for your quick reply.
drwxr-xr-x 2 root root 60 May 18 13:42 lighttpd
I noticed, when I do
chmod 777 /var/log/lighttpd/error.log
-rwxrwxrwx 1 root root 794 May 18 14:44 /var/log/lighttpd/error.log
Lighttpd starts up again.
755 wouldnt work though for that error file.
Is 777 correct for that file?
it’s wrong user/group who is assigned to the directory. You have assigned root while it should be www-data. Should look like this
root@DietPi4:~# ls -la /var/log/ |grep ligh
drwxr-x--- 2 www-data www-data 80 Jan 20 00:03 lighttpd
root@DietPi4:~# ls -la /var/log/lighttpd/
drwxr-x--- 2 www-data www-data 80 Jan 20 00:03 .
drwxr-xr-t 6 root root 320 Jan 19 03:42 ..
-rw-r--r-- 1 www-data www-data 1320 Mai 18 15:06 access.log
-rw-r--r-- 1 www-data www-data 0 Apr 29 01:17 error.log
Changing permissions did the trick for me.
Not sure why they changed, but lighttpd ist working again, even after reboot.