LINUX.ORG.RU
ФорумAdmin

Archlinux | Pi-Hole | Attempt to write a readonly database

 , ,


0

1

Приветствую всех) Не могу понять почему стою на асфальте, а лыжи не едут..

При попытке сохранить что-то в веб-интерфейсе pi-hole (Pi-hole 5.17.1 | FTL v5.23 | Web Interface 5.20.1) получаю ошибку:

Error, something went wrong!

While executing message statement: attempt to write a readonly database

nginx, PHP 8.2.10 запущены от пользователя http


cat /etc/php/php.ini

...
extension=zip
extension=sockets
extension=sqlite3
extension=pdo_sqlite
...
open_basedir = /srv/http/pihole:/run/pihole-ftl/pihole-FTL.port:/run/log/pihole/pihole.log:/run/log/pihole-ftl/pihole-FTL.log:/etc/pihole:/etc/hosts:/etc/hostname:/etc/dnsmasq.d/02-pihole-dhcp.conf:/etc/dnsmasq.d/03-pihole-wildcard.conf:/etc/dnsmasq.d/04-pihole-static-dhcp.conf:/var/log/lighttpd/error-pihole.log:/proc/loadavg:/proc/meminfo:/proc/cpuinfo:/sys/class/thermal/thermal_zone0/temp:/tmp/:/var/log/apache2/:/var/log/lighttpd
...

cat /lib/systemd/system/pihole-FTL.service

[Unit]
Description=Pi-hole FTLDNS engine
After=network.target

[Service]
User=pihole
Group=pihole
PIDFile=/run/pihole-ftl/pihole-FTL.pid
ExecStartPre=/usr/bin/chown -R pihole:pihole /etc/pihole
ExecStartPre=-/usr/bin/chown root:root /etc/pihole/logrotate
ExecStartPre=-/usr/bin/sh -c '/usr/bin/rm -f /dev/shm/FTL-*'
ExecStart=/usr/bin/pihole-FTL no-daemon
ExecReload=/bin/kill -USR1 $MAINPID
Restart=on-failure
TimeoutStopSec=5s
PermissionsStartOnly=true
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_NET_ADMIN CAP_SYS_NICE CAP_IPC_LOCK CAP_CHOWN
     
[Install]
WantedBy=multi-user.target

stat -c «%U:%G %a %n» /etc/pihole/* | column -t

pihole:pihole  777  /etc/pihole/custom.list
pihole:pihole  777  /etc/pihole/dhcp.leases
pihole:pihole  777  /etc/pihole/dns-servers.conf
pihole:pihole  777  /etc/pihole/gravity.db
pihole:pihole  777  /etc/pihole/gravity_old.db
pihole:pihole  777  /etc/pihole/list.1.raw.githubusercontent.com.domains
pihole:pihole  777  /etc/pihole/list.1.raw.githubusercontent.com.domains.sha1
pihole:pihole  777  /etc/pihole/list.3.s3.amazonaws.com.domains
pihole:pihole  777  /etc/pihole/list.3.s3.amazonaws.com.domains.sha1
pihole:pihole  777  /etc/pihole/list.4.s3.amazonaws.com.domains
pihole:pihole  777  /etc/pihole/list.4.s3.amazonaws.com.domains.sha1
pihole:pihole  777  /etc/pihole/local.list
root:root      777  /etc/pihole/logrotate
pihole:pihole  777  /etc/pihole/migration_backup
pihole:pihole  777  /etc/pihole/pihole-FTL.conf
pihole:pihole  777  /etc/pihole/pihole-FTL.db
pihole:pihole  777  /etc/pihole/setupVars.conf
pihole:pihole  777  /etc/pihole/versions

id http

uid=33(http) gid=33(http) группы=33(http),967(pihole)

cat /var/log/nginx/pihole

2023/09/20 22:42:26 [error] 12788#12788: *536 FastCGI sent in stderr: "PHP message: PHP Warning:  SQLite3Stmt::execute(): Unable to execute statement: attempt to write a readonly database in /srv/http/pihole/admin/scripts/pi-hole/php/message.php on line 47" while reading response header from upstream, client: 15.44.74.30, server: media-server.loc, request: "POST /admin/scripts/pi-hole/php/message.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "15.44.74.5:100", referrer: "http://15.44.74.5:100/admin/messages.php"

Спасибо.



Последнее исправление: alexandrovich_ff (всего исправлений: 1)