Warning: /etc/pihole/pihole.toml exists but cannot be read (Permission denied)

At every connection to the Pi-Hole system using SSH, these messages are displayed on the console:

Linux Pihole1 6.18.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.18.34-1+rpt1 (2026-06-09) aarch64
Last login: Thu Jul 30 17:18:41 2026 from 192.168.1.33
Warning: /etc/pihole/pihole.toml exists but cannot be read (Permission denied).
         The value shown below may not reflect the current configuration.
         Try running this command with sudo.
  [✓] FTL is listening on port 53
     [✓] UDP (IPv4)
     [✓] TCP (IPv4)
     [✗] UDP (IPv6)
     [✗] TCP (IPv6)

Warning: /etc/pihole/pihole.toml exists but cannot be read (Permission denied).
         The value shown below may not reflect the current configuration.
         Try running this command with sudo.
  [✓] Pi-hole blocking is enabled
17:29:39 up 5 days, 10:04,  1 user,  load average: 0.25, 0.09, 0.03

Expected Behaviour:

Login to proceed without the error messages.

Actual Behaviour:

Pi-Hole is seems to be functioning correctly.

Debug Token:

Your debug token is: https://tricorder.pi-hole.net/Yv6Nq256/

This doesn't seem to be a Pi-hole issue.

Your above output suggests that your system is configured to automatically run a few commands on each login (including pihole status), but the user account that runs that command lacks the privileges required to read pihole.toml.

Just as the message recommends, you could consider to change your auto-run script to use sudo pihole status - or remove pihole status from it altogether.

Thank you for the response.

I must have been asleep when I wrote this message because I do have a login script that runs pihole status.

Not an excuse but the script was written more than 6 months ago which is long enough for an old man to forget he did it.

As the error messages suggested, I fixed the script to run sudo -u pihole pihole status and now everything is smooth running again.

Thank you for the help.

Butch