docker-pihole "cp: cannot create regular file '/etc/dnsmasq.d/01-pihole.conf': Permission denied"

From the following directions...
> git clone GitHub - pi-hole/docker-pi-hole: Pi-hole in a docker container

    sed -i 's/Chicago/New_York/g' docker-pi-hole/docker_run.sh
    cd docker-pi-hole
    cd ./docker_run.sh

I get from the docker logs....

[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying...
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 20-start.sh: executing...
stty: 'standard input': Inappropriate ioctl for device
::: Starting docker specific checks & setup for docker pihole/pihole
OK: Checks passed for /etc/resolv.conf DNS servers
nameserver 127.0.0.1
nameserver 1.1.1.1
Assigning random password: Yq8M-py6
stty: 'standard input': Inappropriate ioctl for device
[i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u3
[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
cp: cannot create regular file '/etc/dnsmasq.d/01-pihole.conf': Permission denied
[i] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf...[cont-init.d] 20-start.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Are you running on a CIFS/NFS file share that has odd permissions ?

2 posts were split to a new topic: 'Permission denied' when trying to mount a SAMBA share for Docker Pi-hole