Hello there,
since a couple of days I noticed admin console showing "Active" and "FTL offline".
I still have data on web interface and blocking still works.
Here the output of "systemctl status pihole-FTL"
Sep 12 21:43:17 NAS systemd[1]: Starting LSB: pihole-FTL daemon...
Sep 12 21:43:17 NAS pihole-FTL[28317]: Not running
Sep 12 21:43:17 NAS pihole-FTL[28317]: chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
Sep 12 21:43:17 NAS su[28355]: Successful su for pihole by root
Sep 12 21:43:17 NAS su[28355]: + ??? root:pihole
Sep 12 21:43:17 NAS su[28355]: pam_unix(su:session): session opened for user pihole by (uid=0)
Sep 12 21:43:17 NAS su[28355]: pam_systemd(su:session): Failed to create session: Start job for unit user@999.service failed with 'failed'
Sep 12 21:43:17 NAS pihole-FTL[28317]: FTL started!
Sep 12 21:43:17 NAS su[28355]: pam_unix(su:session): session closed for user pihole
Sep 12 21:43:17 NAS systemd[1]: Started LSB: pihole-FTL daemon.
I am still at the beginning of understanding linux. Could pleease someone help?
Hello and thank you for your answer. I just did "sudo touch /etc/pihole/dhcp.leases" and "sudo service pihole-FTL restart", but "sudo service pihole-FTL status" still shows:
Sep 13 13:03:36 NAS su[7136]: pam_systemd(su:session): Failed to create session: Start job for unit user@999.service failed with 'failed'
Hi, as I wrote I still learn linux, but I get better fron day to day...
"systemctl status user@999.service" showed permission-problems with "system.d"...user/group was "urbackup" and not "root". So I corrected all files owned by "urbackup" to "root". Now output is:
user@999.service - User Manager for UID 999
Loaded: loaded (/lib/systemd/system/user@.service; static; vendor preset: enabled)
Drop-In: /lib/systemd/system/user@.service.d
ββtimeout.conf
Active: active (running) since Thu 2018-09-13 14:20:27 CEST; 1h 0min ago
Main PID: 532 (systemd)
Status: "Startup finished in 967ms."
CGroup: /user.slice/user-999.slice/user@999.service
ββinit.scope
ββ532 /lib/systemd/systemd --user
ββ533 (sd-pam)
Sep 13 14:20:27 NAS systemd[532]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Sep 13 14:20:27 NAS systemd[532]: Starting D-Bus User Message Bus Socket.
Sep 13 14:20:27 NAS systemd[532]: Listening on GnuPG network certificate management daemon.
Sep 13 14:20:27 NAS systemd[532]: Listening on GnuPG cryptographic agent and passphrase cache.
Sep 13 14:20:27 NAS systemd[532]: Listening on D-Bus User Message Bus Socket.
Sep 13 14:20:27 NAS systemd[532]: Reached target Sockets.
Sep 13 14:20:27 NAS systemd[532]: Reached target Basic System.
Sep 13 14:20:27 NAS systemd[532]: Reached target Default.
Sep 13 14:20:27 NAS systemd[532]: Startup finished in 967ms.
Sep 13 14:20:27 NAS systemd[1]: Started User Manager for UID 999.
which looks better... "service pihole-FTL status" shows now:
β pihole-FTL.service - LSB: pihole-FTL daemon
Loaded: loaded (/etc/init.d/pihole-FTL; generated)
Active: active (exited) since Thu 2018-09-13 14:20:28 CEST; 1h 1min ago
Docs: man:systemd-sysv-generator(8)
Process: 404 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)
Sep 13 14:20:24 NAS systemd[1]: Starting LSB: pihole-FTL daemon...
Sep 13 14:20:25 NAS pihole-FTL[404]: Not running
Sep 13 14:20:26 NAS su[519]: Successful su for pihole by root
Sep 13 14:20:26 NAS su[519]: + ??? root:pihole
Sep 13 14:20:26 NAS su[519]: pam_unix(su:session): session opened for user pihole by (uid=0)
Sep 13 14:20:28 NAS pihole-FTL[404]: FTL started!
Sep 13 14:20:28 NAS systemd[1]: Started LSB: pihole-FTL daemon.
But on Admin console still "FTL offline". Any ideas?
Hello, just found something runnning "service lighttpd status -l":
Sep 16 22:05:54 NAS lighttpd[524]: sh: 1: pidof: Permission denied
Sep 16 22:05:54 NAS sudo[23945]: www-data : TTY=unknown ; PWD=/var/www/html/admin ; USER=root ; COMMAND=/usr/local/bin/pihole status web
Sep 16 22:05:54 NAS sudo[23945]: pam_unix(sudo:session): session opened for user root by (uid=0)
Sep 16 22:05:54 NAS sudo[23945]: pam_unix(sudo:session): session closed for user root
Sep 16 22:05:58 NAS lighttpd[524]: sh: 1: pidof: Permission denied
Sep 16 22:05:58 NAS sudo[23968]: www-data : TTY=unknown ; PWD=/var/www/html/admin ; USER=root ; COMMAND=/usr/local/bin/pihole status web
Sep 16 22:05:58 NAS sudo[23968]: pam_unix(sudo:session): session opened for user root by (uid=0)
Sep 16 22:05:58 NAS sudo[23968]: pam_unix(sudo:session): session closed for user root
What are the correct permission-setting (user:group) for "/usr/local/bin/pihole"? Now it is root:root...
I think the unsuccesfully install of "urbackup" totally borked my pihole...
Hello,
the permissions of "/etc/sudoers.d/pihole" is root:root 0440 (read-only even for root...is that correct...?!), its content:
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# Allows the WebUI to use Pi-hole commands
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
#
www-data ALL=NOPASSWD: /usr/local/bin/pihole
Me again... What are the right permissions for "/var/www/html/admin"? Here everything belongs to root:root 0755... Permissions of "var/www/html" are www-data:www-data 0775...
Because of that " sh: 1: pidof: Permission denied" I think it must be a permission-problem somewhere...
Those are the correct permissions for the sudoers file (any other permissions would cause it to not work).
What are the permissions of /usr/bin/pidof and /usr/bin/pihole-FTL?
Hi Mcat, permission of "/usr/bin/pihole-FTL" are root:root 755, "/usr/bin/pidof" doesnt even exist, but I was able to find it in /bin/ with permissions root:root 777...
Should user "pihole" be a member of group "sudo"? Now it is only "pihole" and "www-data"...
pihole should only be in the pihole and www-data groups. However, this is not relevant for this thread. PHP uses the www-data user, and does not interact with the pihole user except through FTL.
Thank you very much for your explanation!!!
As I already mentioned, I still learn linux and the learning curve is very steep for me...
Any other ideas how to fix "my" problem?