Pi-hole wont run properly - setupVars.conf & pihole-FTL.conf permissions issue

I installed Pi-hole on Docker, and it didn't work. Specifically there was no login / logout option It went straight to the interface, clicking Settings resulted in an error message unable to open stream or some such for setupVars.conf.

➜ etc-pihole ls -al
total 7857
drwxrwxr-x 1 systemd-coredump systemd-coredump 4096 Dec 10 00:32 .
drwxr-xr-x 1 root root 0 Dec 10 00:31 ..
-rw-r--r-- 1 root root 15 Dec 10 00:32 GitHubVersions
-rw-r--r-- 1 root root 0 Dec 10 00:31 custom.list
-rw-r--r-- 1 root root 651 Dec 10 00:31 dns-servers.conf
-rw-rw-r-- 1 systemd-coredump systemd-coredump 5840896 Dec 10 00:31 gravity.db
-rw-r--r-- 1 root root 94208 Dec 10 00:31 gravity_old.db
-rw-r--r-- 1 root root 2044359 Dec 10 00:31 list.1.raw.githubusercontent.com.domains
-rw-r--r-- 1 root root 95 Dec 10 00:31 list.1.raw.githubusercontent.com.domains.sha1
-rw-r--r-- 1 root root 65 Dec 10 00:31 local.list
-rw-r--r-- 1 root root 13 Dec 10 00:31 localbranches
-rw-r--r-- 1 root root 21 Dec 10 00:31 localversions
drwxr-xr-x 1 root root 0 Dec 10 00:31 migration_backup
---------- 1 systemd-coredump systemd-coredump 20 Dec 10 00:31 pihole-FTL.conf
-rw-rw-r-- 1 root root 53248 Dec 10 00:32 pihole-FTL.db
---------- 1 root root 233 Dec 10 00:31 setupVars.conf
-rw-r--r-- 1 root root 0 Dec 10 00:31 setupVars.conf.update.bak

Changing the permissions manually enabled settings to work briefly, but then the permissions reverted to those shown above.

After much googling, reading, swearing, and reinstalling etc, I installed with the persistent data on my /home directory and everything seems to work.

Doesn't work:

volumes:
- '/IntSSD_HDD1_P1/docker_persistant_data/pi-hole/etc-pihole/:/etc/pihole/'
- '/IntSSD_HDD1_P1/docker_persistant_data/pi-hole/etc-dnsmasq.d/:/etc/dnsmasq.d/'

Works:
- '/home/username/pi-holetest/etc-pihole/:/etc/pihole/'
- '/home/username/pi-holetest/etc-dnsmasq.d/:/etc/dnsmasq.d/'

I have come to the conclusion from everything I have read that it might be down to the file system. All my other docker containers are happy to keep their persistent data where I want it, Id like to get this resolved and would appreciate any help in doing so.

➜ etc-pihole sudo df -Th
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 16G 0 16G 0% /dev
tmpfs tmpfs 3.2G 11M 3.2G 1% /run
/dev/nvme0n1p2 ext4 23G 2.2G 20G 11% /
tmpfs tmpfs 16G 0 16G 0% /dev/shm
tmpfs tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/nvme0n1p1 vfat 511M 3.3M 508M 1% /boot/efi
/dev/nvme0n1p3 ext4 9.2G 6.7G 2.0G 77% /var
/dev/nvme0n1p6 ext4 423G 99M 401G 1% /home
/dev/nvme0n1p5 ext4 1.9G 5.7M 1.7G 1% /tmp
/dev/sda1 fuseblk 124G 23G 101G 19% /IntSSD_HDD1_P1
/dev/sda2 fuseblk 100G 7.9G 93G 8% /IntSSD_HDD1_P2
/dev/sdc1 fuseblk 1.9T 140G 1.7T 8% /ExtDAS_HDD2
/dev/sdd1 fuseblk 1.9T 159M 1.9T 1% /ExtDAS_HDD3
/dev/sdb1 fuseblk 11T 1.8T 9.2T 16% /ExtDAS_HDD1
overlay overlay 9.2G 6.7G 2.0G 77% /var/lib/docker/overlay2/73ae7fbf4c4483a96b2db17a43604b8b87ac0089abebfe68dbe96d8beb8c376e/merged
overlay overlay 9.2G 6.7G 2.0G 77% /var/lib/docker/overlay2/d3042d679fcfb46be6a90ed1c12cb009c151ae3301e95a4b9d5073ccda7c2223/merged
overlay overlay 9.2G 6.7G 2.0G 77% /var/lib/docker/overlay2/5b5638487ff8df136141033a443edbbad3ca5925e06c6d17e9f6db378b0b83b1/merged
overlay overlay 9.2G 6.7G 2.0G 77% /var/lib/docker/overlay2/9770f6e2117a1cf3538b47d8c5379496bdaa4c1b4b9506e7c53e67427625eea8/merged
overlay overlay 9.2G 6.7G 2.0G 77% /var/lib/docker/overlay2/56cd3f93e456fd0712b923137625e80bd80cb15b99668731388267a0adeb418d/merged
overlay overlay 9.2G 6.7G 2.0G 77% /var/lib/docker/overlay2/7d431a26a529c43d04b226bcb724e64632fb47ad1a167fd5f5da4616b298c39d/merged
overlay overlay 9.2G 6.7G 2.0G 77% /var/lib/docker/overlay2/5dde6ef67d3c840dd1a16ca0c1a68efed4e417d3d2dde2016862115536c01977/merged

Thanks for reading!

How exactly did you do that?
Which OS is hosting your dockered Pi-hole?

Also, sharing the exact error message as well as your docker-compose or docker run script would be helpful.

Thanks Bucking_Horn

I'm using using docker-compose:

version: "3"

More info at GitHub - pi-hole/docker-pi-hole: The official Pi-hole Docker image from pi-hole.net and https://docs.pi-hole.net/

services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp"
- "8081:80/tcp"
environment:
TZ: 'Europe/London'
WEBPASSWORD: <REDACTED>
SERVERIP: 192.168.1.196
# Volumes store your data between container upgrades
volumes:
- '/IntSSD_HDD1_P1/docker_persistant_data/pi-hole/etc-pihole/:/etc/pihole/'
- '/IntSSD_HDD1_P1/docker_persistant_data/pi-hole/etc-dnsmasq.d/:/etc/dnsmasq.d/'
# Recommended but not required (DHCP needs NET_ADMIN)
# GitHub - pi-hole/docker-pi-hole: The official Pi-hole Docker image from pi-hole.net
cap_add:
- NET_ADMIN
restart: unless-stopped

OS:

➜ pi-hole cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"

Error:

Error

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:12