ALL adlist connections refused, No cached lists available

In the meantime, you should be able to work around it by creating a dedicated normal unprivileged user for Pi-hole, giving that user sudo access, and deploying Pi-hole under that user rather than root.

I think that would prevent the sqlite3 config file in /root from being accessible and allow both Pi-hole to operate normally and your other sqlite applications to operate with your config on the same system.

1 Like

pihole-FTL sqlite3 learned a new shortcut -ni that adds exactly

https://github.com/pi-hole/FTL/pull/1819


This new shortcut will be added to all Pi-hole scripts by

https://github.com/pi-hole/pi-hole/pull/5518

These are the Pi-hole v6.0 PRs. Backports to the v5.x codebase have been created as well.

1 Like

Hi @chrislph,

Thanks for your reply.

What are the steps to move to Pi-hole not being under Root user ?
Does it require a Reinstall of Pi-hole ? ( in which case I am unlikely to do it ).
Is it the recommended way ?

An easier workaround seems to be just to rename /root/.sqliterc before running pihole -g and then to rename it back after that runs.

Hi @DL6ER and thanks for your reply.

That new shortcut -ni that you point out, can it be used with the pihole -g command ? If so - how ?

I think you meant that those people who maintain the code should add -ni to every sqlite3 call that is made in the code that is run by pihole -g. That would certainly stop this problem from happening for anyone else in the future... Is that what you meant ?

DL6ER already added the new code.
The new option will be available when the new code is reviewed, approved and merged.

2 Likes

WOW !!! That is freaking AWESOME !! :blush::sparkling_heart:

1 Like

That's a good question, since Pi-hole installs files and folders with a mixture of ownerships. Technically you could identify all the files and use a number of carefully crafted chown commands. But since they are all installed as root in your case, how could you tell apart a file which needs a normal user but root group?

Does a pihole -r repair check and fix ownership and permissions? If so, running that as the new user with sudo might do it easily. Can Pi-hole folks confirm if that would have worked here please?

That's much easier but I guess it risks breaking other apps that are using sqlite during that time, and it still may cause problems during normal operation, eg the debug log is an example of how it went wrong.

Anyway no need to change your setup, the fix has been done at light speed (which is appropriate!) so it won't be too long before you can try it.

1 Like

There are basically two options here:

  1. Wait for Pi-hole v6.0
    Pi-hole v6.0 massively improves on permissions. Almost everything is running under the unprivileged user pihole. Exceptions are the debug log which still needs sudo to get certain hardware information about your system only root has. But things are certainly a lot improved here.
    As to when it comes: We are already pretty advanced in beta testing, however, we will surely not release "tomorrow" as there is still a lot of written code in the reviewing pipelines.
  2. Run Pi-hole in a docker container
    This is (almost) the perfect way of isolating Pi-hole from the rest of your system. You won't have to care about interactions with other system parts, can easily upgrade, etc., etc. Running in docker as an end user that does not want to do development is a very nice thing. If you want to do development, that's possible, too, even when a bare metal installation is slightly easier (as in: more convenient) in this case.
1 Like

Hi @DL6ER and thank you for your replies !!

Yes your advice and your explanations are spot on and have allow me to understand and solve the problem. Even if , as noted, it is via a workaround at this time.

Thanks again - and a big shutout and thanks to all the developers involved in v6 :folded_hands:t2:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.