Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory #69

Closed
plsnotracking opened this issue Aug 13, 2020 · 7 comments

Comments

@plsnotracking
Copy link

So, the pihole seems to have started up all right but as I was going through the logs:

chown: cannot access '': No such file or directory
chmod: cannot access '': No such file or directory
chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory

Is there something that I missed that maybe should've worked?

Also another question, how do I setup DoH?

I was following this - https://kauri.io/68-selfhost-pihole-on-kubernetes-and-block-ads-and/5268e3daace249aba7db0597b47591ef/a and they seem to have not explained that, is there any place I can read on how to configure DoH? Thank you.

@11jwolfe2
Copy link

This happens for me as well. I used that same tutorial to set up my cluster. If you are using a persistent volume as well, use a ssh connection to get to your drive and run these two commands.
ls -l ----> this will show the owner and user of each file they all should be www-data if not run this cmd
sudo chown -R www-data:www-data pihole from the /mnt/ssd directory described in the tutorial. This will allow you to add more whitelists/blacklists/adlists from the web portal.

@plsnotracking
Copy link
Author

Seems like I still get the error:

chown: cannot access '': No such file or directory
chmod: cannot access '': No such file or directory

What I did was, as you suggested, unless I missed something.

  • ssh onto my pi.
  • cd to the pi-hole folder within /mnt/ssd
  • run sudo chown -R www-data:www-data pihole from the outside.
  • Output
ls -al ~/mnt/ssd/pihole

total 123800
drwxrwxr-x 4        999 spi             4096 Oct  1 00:01 .
drwxr-xr-x 8 pi pi      4096 Sep 16 03:23 ..
-rw-r--r-- 1 www-data   www-data         118 Aug 15 22:50 adlists.list
drwxrwxr-x 3 pi spi             4096 Sep 30 23:54 backup
-rw-r--r-- 1        999 spi             1681 Aug 16 06:02 dhcp.leases
-rw-r--r-- 1 www-data   www-data         596 Sep 30 23:58 dns-servers.conf
-rw-r--r-- 1 www-data   www-data          18 Sep 30 23:58 GitHubVersions
-rw-rw-r-- 1        999 spi          5029888 Sep 30 23:58 gravity.db
-rw-r--r-- 1 www-data   www-data     1131655 Sep 30 23:58 list.0.raw.githubusercontent.com.domains
-rw-r--r-- 1 www-data   www-data      594616 Aug 15 22:09 list.1.mirror1.malwaredomains.com.domains
-rw-r--r-- 1 www-data   www-data          20 Oct  1 00:00 localbranches
-rw-r--r-- 1 www-data   www-data          41 Sep 30 23:58 local.list
-rw-r--r-- 1 www-data   www-data          41 Oct  1 00:00 localversions
drwxr-xr-x 2 www-data   www-data        4096 Aug 15 22:09 migration_backup
-rw-r--r-- 1        999 spi                0 Aug 15 22:09 pihole-FTL.conf
-rw-r--r-- 1 root       root       119951360 Oct  1 00:01 pihole-FTL.db
-rwxr-xr-x 1 www-data   www-data           0 Aug 15 22:09 regex.list
-rw-r--r-- 1 www-data   www-data         717 Sep 30 23:58 setupVars.conf
-rw-r--r-- 1 www-data   www-data         717 Sep 30 23:58 setupVars.conf.update.bak

Thanks @11jwolfe2

@MoJo2600
Copy link
Owner

Does it possibly be the same issue that has been resolved in this issue: #39 Just guessing, as I do not know your exact setup.

@MoJo2600
Copy link
Owner

MoJo2600 commented Jan 13, 2021

#107 I think this is the same error

@elcid2012
Copy link

elcid2012 commented Jan 26, 2021

@MoJo2600 I'm getting this error in the logs on a fresh Docker installation, although everything seems to be working. That is, I just tested adding a domain to the whitelist without issues as alluded to in #39 and blocking/gravity db generation seems to work just as well.

Incidentally, I just checked the logs of my existing Pi-Hole that's been running for months, also Docker, and it's showing the same error.

I am not using the DHCP server feature on either Pi-Hole, so perhaps that's why the error is getting thrown while everything else seems to work correctly?

@MoJo2600
Copy link
Owner

Ok, I'll have to check if I can reproduce this error

@Roelski
Copy link

Roelski commented Jan 31, 2021

This happens for me as well. I used that same tutorial to set up my cluster. If you are using a persistent volume as well, use a ssh connection to get to your drive and run these two commands.
ls -l ----> this will show the owner and user of each file they all should be www-data if not run this cmd
sudo chown -R www-data:www-data pihole from the /mnt/ssd directory described in the tutorial. This will allow you to add more whitelists/blacklists/adlists from the web portal.

Is used this to get it running for me. thanx!
Running a shell inside the pihole docker container.
With ls -l /etc/pihole there were different permissions. Some root, some pihole.
Used:
cd /etc
sudo chown -R www-data:www-data pihole

All done inside the container. No reboots required. Worked immediately.
Hope this helps others.

MoJo2600 added a commit that referenced this issue Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants