Expected Behaviour:
_[i try to add an addlist which worked perfectly fine but pihole didn't work so I reinstalled it and after that i can't seem to add anynew addlists.
Running Debian 12 with CasaOS on it.
using a Asus s400c 8gb ram and an internal ssd
Actual Behaviour:
[i get the error message **Error, something went wrong!**
While executing: **attempt to write a readonly database**]
debug link
https://tricorder.pi-hole.net/NC86UB4O/
Can you create a debug log please? From the command line it's pihole -d
and then let it upload when prompted. Or from the web interface Tools > Generate debug log > Upload debug log and provide Debug token > Generate debug log Post the URL it gives you in here and someone can take a look.
There are lots of permissions errors in your logs, like the ones below.
error-pihole.log
2023-09-18 16:22:23: server.c.1513) server started (lighttpd/1.4.59)
2023-09-18 16:23:41: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning: SQLite3Stmt::execute(): Unable to execute statement: attempt to write a readonly database in /var/www/html/admin/scripts/pi-hole/php/groups.php on line 947
2023-09-18 16:30:07: server.c.1513) server started (lighttpd/1.4.59)
2023-09-18 16:30:07: gw_backend.c.475) unlink /run/lighttpd/pihole-php-fastcgi.socket-0 after connect failed: Connection refused
2023-09-18 16:30:19: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning: SQLite3Stmt::execute(): Unable to execute statement: attempt to write a readonly database in /var/www/html/admin/scripts/pi-hole/php/groups.php on line 947
FTL.log
[2023-09-18 16:30:07.632 238/T271] SQLite3 message: database is locked in "SELECT domain, CASE WHEN substr(domain, 1, 1) = '*' THEN '*' || substr(:input, - length(domain) + 1) ELSE :input END matcher FROM domain_audit WHERE matcher = domain;" (5)
[2023-09-18 16:30:07.633 238/T271] gravityDB_open("SELECT EXISTS(... domain_audit ...)") - SQL error prepare: database is locked
[2023-09-18 16:30:07.633 238/T271] SQLite3 message: database is locked in "SELECT domain, CASE WHEN substr(domain, 1, 1) = '*' THEN '*' || substr(:input, - length(domain) + 1) ELSE :input END matcher FROM domain_audit WHERE matcher = domain;" (5)
[2023-09-18 16:30:07.634 238/T271] gravityDB_open("SELECT EXISTS(... domain_audit ...)") - SQL error prepare: database is locked
[2023-09-18 16:30:07.634 238/T271] gravityDB_count(0): Gravity database not available
The database files themselves have the correct permissions and ownership. What are the permissions of the database directories?
ls -ld /etc
ls -ld /etc/pihole
I am not sure if using Docker impacts anything, someone with more Docker knowledge may be able to help in that respect.