PHP permissions error web admin page

docker

#1

Hi all,

I hope you can hep me.

Pihole is installed on a QNAP nas within a docker container. Everything is running smooth except that I cannot change any settings. Also I do not see any version in the footer.

Cheers,
C

Expected Behaviour:

Settings should be saved when entering the settings view

Actual Behaviour:

Settings are actually not saved while it says there is a permission error. Appdata folder have been created new,

Debug Token: 0q9vn97p8u

##############################################
There was a problem applying your settings.
Debugging information:
PHP error (2): parse_ini_file(/etc/pihole/setupVars.conf): failed to open stream: Permission denied in /var/www/html/admin/settings.php:11


#2

What is the output of ls -al /etc/pihole/setupVars.conf


#3

#4

-rwxrwxrwx+ 1 root root 295 Oct 21 22:52 /etc/pihole/setupVars.conf
2018-11-05_17-18-07

I am wondering why it does not have any permissions since I changed them so it should have it.

Besides that I did also set the user+group for the docker container to the corresponding docker user/group like the following:


#7

QNAP docker pi-hole has been pretty hit or miss, I haven’t seen much of a fix other than reinstalling container station.

I am wondering why it does not have any permissions since I changed them so it should have it.

Did you still have errors after chmod 777 on setupvars

The stock permission is enough typically, other’s read -rw-r--r-- works fine in my tests on stock docker.

Related thread : PHP permissions error web admin page

Stock docker is all I have to work with unfortunately so if there are any code fixes that are needed I’ll need some direction from community members custom hacking the image (or maybe container station) to see what fixes things.


#9

Thanks for your help so far. I guess if that behaviour is not expected like this and permissions should work out of the box I would say the next step is to re-install container station. I am really wondering why they don’t want to provide a standard docker package by default.


#10

Ok, so just uninstalled container station, removed the container data folder, the appdata folder and did a clean install. But the problem still exists. I assume that docker is installed somewhere deep in the system. :frowning:

Would you have some recommendations here?

docker create
–name pihole
–restart=always
–cap-add=NET_ADMIN
–memory=4g
–dns=127.0.0.1 --dns=1.1.1.1
–ip=192.168.178.4
–net docker-static-bridge
-e IPv6=False
-e DNS1=1.1.1.1
-e DNS2=8.8.8.8
-e ServerIP=192.168.178.4
-e TZ=Europe/Berlin
-e PUID=1001 -e PGID=100
-h pihole
-v /share/appdata/pihole/:/etc/pihole/
-v /share/appdata/pihole/dnsmasq.d/:/etc/dnsmasq.d/
pihole/pihole:dev


#11

Looks like you’re using volumes on a QNAP folder share. Does your folder share have at least read permission for ‘guest access’ ?

The thought occurred to me in this other thread, which looks like an identical issue.


#12

Hi chrneu,
I had the same symptoms you describe, what solved the problem for me (see the other thread linked by diginc) was to remove the ACL on your appdata folder before creating the docker.
After that the ls -al /share/appdata/pihole lost the ‘+’ on permissions for setupVars.conf and the web admin page works properly.
Cheers