Pi-hole: /etc/pihole/adlists.list permission problem

Created on 15 Sep 2018  路  3Comments  路  Source: pi-hole/pi-hole

In raising this issue, I confirm the following:

How familiar are you with the the source code relevant to this issue?:
1


Expected behaviour:
The Pi-hole admin page should work

Actual behaviour:
Steps to reproduce:
Fresh install on Raspberry Pi with all the latest updates. Point a webbrowser at http:///admin/

Debug token provided by uploading pihole -d log:
Not provided

Troubleshooting undertaken, and/or other relevant information:
Looking in /var/log/lighttpd/error.log shows
(mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning: file(/etc/pihole/adlists.list): failed to open stream: Permission denied in /var/www/html/pihole/index.php on line 120

The permissions on /etc/pihole/adlists.list are
$ sudo ls -al /etc/pihole/adlists.list
-rw------- 1 root root 381 Sep 15 17:42 /etc/pihole/adlists.list

Investigating Issue

Most helpful comment

The following provided a successful install

$ sudo -s
# umask 0022
# curl -sSL https://install.pi-hole.net | bash

All 3 comments

Have you changed the default permissions for new files? On a new install, I see this:

-rw-r--r--. 1 root   root         381 Sep 15 21:05 adlists.list

After much searching (including a complete system reinstall) I finally remembered to check my bashrc. And yes, there is a umask setting.

umask 0077

So the pi-hole install script is relying on a different umask? I see that the default umask is normally 0022. I'll manually set that and do the pi-hole install now.

The following provided a successful install

$ sudo -s
# umask 0022
# curl -sSL https://install.pi-hole.net | bash
Was this page helpful?
0 / 5 - 0 ratings

Related issues

mschwager picture mschwager  路  5Comments

z3to picture z3to  路  4Comments

davidreverett picture davidreverett  路  4Comments

phzang picture phzang  路  5Comments

agietl picture agietl  路  6Comments