Output of sudo systemctl -l status lighttpd is below:
pi@raspberrypi:~ $ sudo systemctl -l status lighttpd
ā lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled)
Active: active (running) since Tue 2017-05-16 19:17:08 UTC; 1 weeks 6 days ago
Process: 492 ExecStartPre=/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
Main PID: 735 (lighttpd)
CGroup: /system.slice/lighttpd.service
āā735 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
āā756 /usr/bin/php-cgi
āā761 /usr/bin/php-cgi
āā762 /usr/bin/php-cgi
āā763 /usr/bin/php-cgi
āā764 /usr/bin/php-cgi
May 30 18:24:51 raspberrypi sudo[1517]: pam_unix(sudo:session): session closed for user root
May 30 18:24:51 raspberrypi lighttpd[735]: sh: 1: pihole-FTL: not found
May 30 18:25:28 raspberrypi sudo[1545]: www-data : TTY=unknown ; PWD=/var/www/html/admin ; USER=root ; COMMAND=/usr/local/bin/pihole status web
May 30 18:25:28 raspberrypi sudo[1545]: pam_unix(sudo:session): session opened for user root by (uid=0)
May 30 18:25:28 raspberrypi sudo[1545]: pam_unix(sudo:session): session closed for user root
May 30 18:25:28 raspberrypi lighttpd[735]: sh: 1: pihole-FTL: not found
May 30 18:38:32 raspberrypi sudo[1708]: www-data : TTY=unknown ; PWD=/var/www/html/admin ; USER=root ; COMMAND=/usr/local/bin/pihole status web
May 30 18:38:32 raspberrypi sudo[1708]: pam_unix(sudo:session): session opened for user root by (uid=0)
May 30 18:38:33 raspberrypi sudo[1708]: pam_unix(sudo:session): session closed for user root
May 30 18:38:33 raspberrypi lighttpd[735]: sh: 1: pihole-FTL: not found
pi@raspberrypi:~ $
Repair completed. The admin home page is loading now. However, this created a new issue. See below error.
pi@raspberrypi:~ $ pihole-FTL
FATAL: Opening of FTL log (/var/log/pihole-FTL.log) failed!
Make sure it exists and is writeable by user pi
To resolve the above error, I changed the owner to "pi", but I am getting the following error now. When I rebooted my raspberry pi, the owner of /var/log/pihole-FTL.log changed back to "pihole".
pi@raspberrypi:~ $ sudo chown pi /var/log/pihole-FTL.log
pi@raspberrypi:~ $ pihole-FTL
Found pihole-FTL process with PID 758 (my PID 2130) - killing it ...
Killing failed (Operation not permitted) ... Exiting now ...
Although I did not have the same issue, I suspect that this could not only some configuration problem but also of permissions and ownerships on some files and directories.
I my case, I have had a similar problem as seen here:
I have not received any suggestion on what to do next.
Should there be a user pi configured on the system at all or is it compulsory?
Hey @SunderRaj
so at first you can just type in sudo before you execute a command...
you can also put your login (pi) in the sudorers file so you are the same as the sudo before the command.
Although sudo is here fore a reason so that you don't execute an command as deleting important stuff...
(you can also use sudo su to be sudo)
hope that helps
Okay, so let's do this in a coordinated fashion before you nuke anything on your device with messed up permissions - especially changing sudo's behavior is an enormous dangerous endeavor!
That is correct - you should not start pihole-FTL directly. Instead, you should be using
sudo service pihole-FTL start
or
sudo service pihole-FTL restart
as this will take care of the permissions and start FTL as user pihole (which has no sudo power at all so cannot destroy your system!).
This means that FTLis actually already running correctly (which is not surprising since the web frontend cannot work properly w/o FTL running on the device).
Yes, that is correct and it should be like this. I think your issue is already resolved and there was just this litte misinterpretation to be deskewed