Finally got it to work!
I went through each directory for pihole and looked at the ownership/group of each file. Here's what I found:
The ownership for /var/www/html/admin/scripts
was www-data
:
drwxr-xr-x 4 www-data www-data 4096 Mar 7 14:09 scripts
Within the scripts directory, the ownership for /var/www/html/admin/scripts/pi-hole
was also www-data
:
drwxr-xr-x 4 www-data www-data 4096 Mar 7 14:09 pi-hole
As well as the directories inside js
and php
drwxr-xr-x 2 www-data www-data 4096 Mar 8 15:58 js
drwxr-xr-x 2 www-data www-data 4096 Mar 8 15:58 php
However, the files within, had root
as the owner/group. Here's a snip from the php folder:
-rw-r--r-- 1 root root 2549 Mar 8 15:58 add.php
-rw-r--r-- 1 root root 431 Mar 8 15:58 api_token.php
-rw-r--r-- 1 root root 5033 Mar 8 15:58 auth.php
-rw-r--r-- 1 root root 3881 Mar 8 15:58 customdns.php
-rw-r--r-- 1 root root 7621 Mar 8 15:58 database.php
-rw-r--r-- 1 root root 728 Mar 7 22:55 debug.php
-rw-r--r-- 1 root root 3855 Mar 8 15:58 footer.php
-rw-r--r-- 1 root root 1382 Mar 8 15:58 FTL.php
-rw-r--r-- 1 root root 1516 Mar 8 15:58 func.php
-rw-r--r-- 1 root root 1788 Mar 8 15:58 gravity.php
-rw-r--r-- 1 root root 1225 Mar 7 22:55 gravity.sh.php
-rw-r--r-- 1 root root 27659 Mar 8 15:58 groups.php
-rw-r--r-- 1 root root 32099 Mar 8 15:58 header.php
-rw-r--r-- 1 root root 3560 Mar 8 15:58 loginpage.php
-rw-r--r-- 1 root root 3208 Mar 7 22:55 password.php
-rw-r--r-- 1 root root 1740 Mar 7 22:55 queryads.php
-rw-r--r-- 1 root root 20507 Mar 8 15:58 savesettings.php
-rw-r--r-- 1 root root 1285 Mar 7 22:55 tailLog.php
-rw-r--r-- 1 root root 14484 Mar 8 15:58 teleporter.php
-rw-r--r-- 1 root root 2535 Mar 7 22:55 update_checker.php
Once I changed the ownership of these files to www-data
, I was able to restore the functionality of editing the white/blacklists in the admin panel.