r/pihole•
InFerYes

webinterface FTL.log spams "Failed to open log file. Check permissions!"

Hi, I have brought back a device from the dead and have 1 more thing to resolve. Everything is working fine in the background, but in the webinterface I have an issue with Tail FTL.log. When I click it, I get a view that keeps spamming the following text:

Failed to open log file. Check permissions!
Failed to open log file. Check permissions!
Failed to open log file. Check permissions!
Failed to open log file. Check permissions!

I know where the log is located and it has pihole:pihole ownershop. I'm thinking this might be a lighttpd permission thing. Anyone have an insight? This is installed on an Odroid C1 SBC running Arch Linux, not using docker.

The directory and file path of this log have been added to the php open_basedir variable.

I could always look at the log on the device itself, but it would be nice to be able to see it straight from the webinterface again.

Thanks!

edit: I needed to add /run/log/pihole-ftl/pihole-FTL.log to the open_basedir variable as well. This solved my problem!

Posted Feb 12, 2023, 4:22 PM UTC · edited

211
rdwebdesign:pihole: Team•

Generate a Debug Log, upload the log and post here only the Token.

2
[deleted]•

[deleted]

1
sanichedgeheg•

Hey OP, I'm in the same boat and see your edit, however I am not so savvy with Apache, and/or where to add the open_basedir variable. I primarily set up Apache so I wouldn't have to use lighttp and easily add a custom certificate for port 443. Tailing the log from the web page is pretty nice so I'd love to have this functioning again on my server. Can you point me in the right direction please?

1
InFerYesOP•

You need to add the string /run/log/pihole-ftl/pihole-FTL.log to /etc/php/php.ini's variable open_basedir

; open_basedir, if set, limits all file operations to the defined directory
open_basedir = /srv/http/pihole:/run/pihole-ftl/pihole-FTL.port:/run/log/pihole/pihole.log:/mnt/mmc/pihole:/mnt/mmc/pihole/pihole-FTL.log:/etc/pihole:/etc/hosts:/etc/hostname:/etc/dnsmasq.d/02-pihole-dhcp.conf:/etc/dnsmasq.d/03-pihole-wildcard.conf:/etc/dnsmasq.d/04-pihole-static-dhcp.conf:/var/log/lighttpd/error-pihole.log:/proc/loadavg:/proc/meminfo:/proc/cpuinfo:/sys/class/thermal/thermal_zone0/temp:/tmp:/run/log/pihole-ftl/pihole-FTL.log
; Note: if open_basedir is set, the cache is disabled

The directories and files are separated by :

1