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

**URL:** https://discourse.pi-hole.net/t/docker-pihole-cp-cannot-create-regular-file-etc-dnsmasq-d-01-pihole-conf-permission-denied/22840
**Category:** docker
**Created:** [August 29, 2019, 4:17pm UTC](https://discourse.pi-hole.net/t/docker-pihole-cp-cannot-create-regular-file-etc-dnsmasq-d-01-pihole-conf-permission-denied/22840 "2019-08-29T16:17:11Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![swvajanya\_tek](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/swvajanya_tek/32/9454_2.png) [@swvajanya\_tek](https://discourse.pi-hole.net/u/swvajanya_tek)
#### Post date: [August 29, 2019, 4:17pm UTC](https://discourse.pi-hole.net/t/docker-pihole-cp-cannot-create-regular-file-etc-dnsmasq-d-01-pihole-conf-permission-denied/22840/1 "2019-08-29T16:17:12Z")

</div>

From the following directions...  
\> git clone [https://github.com/pi-hole/docker-pi-hole.git](https://github.com/pi-hole/docker-pi-hole.git)

> ```
> 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.

---

<div class="post-metadata">

### Author: ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)
#### Post date: [August 30, 2019, 1:43pm UTC](https://discourse.pi-hole.net/t/docker-pihole-cp-cannot-create-regular-file-etc-dnsmasq-d-01-pihole-conf-permission-denied/22840/2 "2019-08-30T13:43:03Z")

</div>



---

<div class="post-metadata">

### Author: ![diginc](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/diginc/32/96_2.png) [@diginc](https://discourse.pi-hole.net/u/diginc)
#### Post date: [September 30, 2019, 8:10pm UTC](https://discourse.pi-hole.net/t/docker-pihole-cp-cannot-create-regular-file-etc-dnsmasq-d-01-pihole-conf-permission-denied/22840/3 "2019-09-30T20:10:01Z")

</div>

> [@swvajanya\_tek](#):
>
> cp: cannot create regular file ‘/etc/dnsmasq.d/01-pihole.conf’: Permission denied

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

---

<div class="post-metadata">

### Author: ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)
#### Post date: [August 1, 2022, 5:05pm UTC](https://discourse.pi-hole.net/t/docker-pihole-cp-cannot-create-regular-file-etc-dnsmasq-d-01-pihole-conf-permission-denied/22840/4 "2022-08-01T17:05:59Z")

</div>

2 posts were split to a new topic: ['Permission denied' when trying to mount a SAMBA share for Docker Pi-hole](https://discourse.pi-hole.net/t/permission-denied-when-trying-to-mount-a-samba-share-for-docker-pi-hole/56856)

---

<div class="post-metadata">

### Author: ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)
#### Post date: [September 3, 2022, 9:35am UTC](https://discourse.pi-hole.net/t/docker-pihole-cp-cannot-create-regular-file-etc-dnsmasq-d-01-pihole-conf-permission-denied/22840/5 "2022-09-03T09:35:23Z")

</div>


