The web password rendering is definitely weird but I'm thinking it's confused since it can't even read your settings still most likely.
Do you use volumes on a QNAP folder share for pi-hole's data? Also is it NFS or CIFS? After you ran chmod 777 did you re-try your docker exec test of docker exec -it -u www-data piholecon bash
? That should work for sure and is the crux of our problem having the web interface parse your setupVars.
Sorry for so many questions, I started digging around QNAP forums a bit. This post caught my eye and makes a bit of sense to me.
Pointing a docker volume to a QNAP-NAS shared folder may have permission issues depending on the guest access. I think guest access is roughly equivalent to the last permission bit / other permission which at a minimum has to be read for setupVars.conf.
NAS ACL permission systems may have higher priority than linux file permissions, hence 777 linux perms still resulting in permission denied.
So I'd say make sure guest have at least read priv on your shared folder containing volumes to see if that fixes it.
Another useful command you might have on your QNAP os (but no inside pi-hole container) is getfacl
to inspect permissions of your volume folder, or the docker root storage for containers ing eneral (part of your docker info output: Docker Root Dir: /share/CACHEDEV1_DATA/Container/container-station-data/lib/docker
)