Page 1 of 1

Lighttpd failed to start - '/var/log/lighttpd/error.log' failed: No such file or directory

Posted: Mon May 18, 2020 1:46 pm
by Totila
Hi guys,

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?

Cheers,
T

Re: Lighttpd failed to start - '/var/log/lighttpd/error.log' failed: No such file or directory

Posted: Mon May 18, 2020 2:33 pm
by Joulinar
Hi,

many thanks for your report. Maybe you have incorrect permission on the folder. Pls can you post following

Code: Select all

ls -la /var/log/

Re: Lighttpd failed to start - '/var/log/lighttpd/error.log' failed: No such file or directory

Posted: Mon May 18, 2020 2:52 pm
by Totila
Thanks for your quick reply.

Code: Select all

drwxr-xr-x  2 root   root     60 May 18 13:42 lighttpd
I noticed, when I do

Code: Select all

chmod 777 /var/log/lighttpd/error.log
Resulting in

Code: Select all

-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?

Re: Lighttpd failed to start - '/var/log/lighttpd/error.log' failed: No such file or directory

Posted: Mon May 18, 2020 3:08 pm
by Joulinar
Hi,

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

Code: Select all

root@DietPi4:~# ls -la /var/log/ |grep ligh
drwxr-x---  2 www-data www-data   80 Jan 20 00:03 lighttpd
root@DietPi4:~#
root@DietPi4:~# ls -la /var/log/lighttpd/
insgesamt 4
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
root@DietPi4:~#

Re: Lighttpd failed to start - '/var/log/lighttpd/error.log' failed: No such file or directory

Posted: Mon May 18, 2020 4:30 pm
by Totila
Changing permissions did the trick for me.

Not sure why they changed, but lighttpd ist working again, even after reboot.

Many thanks!