The issue I am facing:
I have yesterday (29/09/2022) successfully installed pihole on a Raspberry Pi 4B running Raspbian GNU/Linux 10 (buster). But I am now receiving an error message on the Settings page saying:
Error
There was a problem applying your settings.
Debugging information:
PHP error (2): session_start(): open(/var/lib/php/sessions/sess_bnjcn8j8ostlijp0smq8q1r4t7, O_RDWR) failed: Permission denied (13) in /var/www/html/admin/scripts/pi-hole/php/func.php:661
:
Details about my system:
I am running Apache2 as a separate service to Lighttpd which was installed with pihole. Lighttpd is using port 80. Apache2 is using a different port for a different application. The reason I have two separate http servers is because one of them runs under a different username and permissions on its subdirectory are specific to that.
What I have changed since installing Pi-hole:
I made the mistake of changing all ownership under the pihole html directory with chown -R pihole:pihole /var/www/html. This is because I assumed (wrongly) that files should not be set to root:root.
I have tried changing ownership back to root:root and also tried www-data:www-data. I have not changed any permissions (chmod).
I am pretty sure I've messed up the ownership as some files should be set as www-data, some as root and some as pihole.
I am hoping someone can please tell me what the correct permissions should be for each file and subfolder under /var/www/html, then I will try setting them back to defaults. I have tried searching the web and forums for a complete list, but without success.