FTL always fail to access /var/log/pihole.log after R-PI reboot

Please follow the below template, it will help us to help you!

Expected Behaviour:

no FTL, no admin (lighhttpd don't start)

Actual Behaviour:

when restarting my R-PI ( volumio) where I installed pi-hole :

  • FTL don't start
    [2017-11-04 09:30:10.098] WARN: Opening of /var/log/pihole.log failed!
    [2017-11-04 09:30:10.098] Make sure it exists and is readable by user pihole
    Will try again in 15 seconds.
    [2017-11-04 09:30:25.104] FATAL: Opening of /var/log/pihole.log failed permanently!

each time device reboot , dnsmasq take ownership of pihole.log and don't allow FTL to start.

  • I changed HTTP port to 8080 in external.conf to avoid HTTP port conflict
    volumio@volumio:~$ ll /etc/lighttpd/external.conf
    -rw-r--r-- 1 root root 19 Nov 4 09:29 /etc/lighttpd/external.conf
    volumio@volumio:~$ cat /etc/lighttpd/external.conf
    server.port = 8080

But there is nothing present on port 8080

I think this also could be related to log writing issue because lighthttpd never create /var/log/lighthttp folder

Debug Token:

---=== Your debug token is : wo4pkb24sh Please make a note of it. ===---

Thank you all for your help , I am aware I try to use my rasberry-pi for 2 things, but one is filtering ads, the other is playing music. The only thing I share in a HTTP server....

After some debuging I noticed that the lighttp server did not start due to a config file issue.
if I add in /etc/lighttpd/ an external.conf contaning :
server.port = 8080

httpd failed to start.

So issue #2 is solved. Now I still don't know how to sort out /var/log files rights at startup.

thanks

What do you mean by that? Does dnsmasq create the file pihole.log such that other processes cannot even read it?
What is the output of

$ ls -lh /var/log/pihole.log

?

For me, the permissions are

-rw-r--r-- 1 dnsmasq root 4,6M Nov  4 18:59 /var/log/pihole.log

Another question: Do you have your /var/log folder mounted as tmpfs such that the file pihole.log isn't present at bootup?

hi
to answer : volumio@volumio:~$ ls -lh /var/log/
total 204K
-rw------- 1 root utmp 384 Nov 5 08:43 btmp
-rw-r--r-- 1 pihole pihole 277 Nov 5 07:45 pihole-FTL.log
-rw-r----- 1 dnsmasq root 184K Nov 5 08:43 pihole.log
-rw-r--r-- 1 volumio volumio 6.4K Nov 5 07:46 volumio.log

yes it is :
volumio@volumio:~$ df -h | grep log
tmpfs 487M 216K 487M 1% /var/log

In fact I was wondering that when dnsmasq create the pihole log file it should let it enough rights to FTL . isn't it ?

So each time my Rpi reboots, I chmod pihole.log file and restart FTL

Yes.

-rw-r----- isn't sufficient as -rw-r--r-- is needed. Maybe it would work if you add the user pihole to the group dnsmasq.

Try

sudo adduser pihole dnsmasq

and restart your Pi-hole.