Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot delete diagnosis LOAD message #958

Closed
r2ixuz opened this issue Dec 29, 2021 · 10 comments
Closed

Cannot delete diagnosis LOAD message #958

r2ixuz opened this issue Dec 29, 2021 · 10 comments
Labels

Comments

@r2ixuz
Copy link

r2ixuz commented Dec 29, 2021

Versions

Platform

Docker Tag 2021.12.1 Pi-hole v5.7 FTL v5.12.1 Web Interface v5.9

Expected behavior

Able to delete any diagnosis message.

Actual behavior / bug

Unable to delete LOAD diagnosis message: "Error, something went wrong! While executing message statement: attempt to write a readonly database"

Steps to reproduce

Use latest stable Docker Image and wait for high system load. ;-)

Screenshots

screenshot

Additional context

My DB is writeable as any other stuff in Pi-Hole works as normal. Just deleting this message is not possible.

@DL6ER DL6ER transferred this issue from pi-hole/web Dec 29, 2021
@yubiuser
Copy link
Member

yubiuser commented Dec 29, 2021

Have a look here: https://discourse.pi-hole.net/t/error-while-deleting-diagnosis-entry/51814

The solution there might also fix your issue.

@r2ixuz
Copy link
Author

r2ixuz commented Dec 29, 2021

Yes, changing permissions for pihole-FTL.db to the Docker containers user "pihole" (ID 999) works.

Originally it was owned by root:root. And FTL process is running as root, so it should have been working as it was. There is something wrong.

On the other hand, these 3 files in /etc/pihole are already owned by "pihole": gravity.db, gravity_old.db, pihole-FTL.conf.

Removing the pihole-FTL.db file and restarting/recreating the containers sets the permissions again wrong to root for the newly created DB file.

@DL6ER
Copy link
Member

DL6ER commented Dec 29, 2021

FTL creates the database itself. Hence, it is root owned. In your case, the web interface wants to modify the database. This is done by another process not running as root.

Either we chown the database or run FTL as user pihole as we do on native installs (FTL is never running as root here). I'd prefer the later.

@DL6ER
Copy link
Member

DL6ER commented Dec 29, 2021

The question is also: What changed in the docket scripts? The database is there for years, however, the reports for this permission issues are all rather new. Suggesting a change having happened rather recently.
@PromoFaux

@yubiuser
Copy link
Member

Maybe: pi-hole/web#1886

Needed change of permission in FTL (pi-hole/FTL#1162) and core (pi-hole/pi-hole#4328)

@DL6ER
Copy link
Member

DL6ER commented Dec 29, 2021

You are right. The delete button is the new element in the equation. It has always been like this but it wasn't really discovered before ... flushing the network table is one other thing but that isn't done very often.

FTL sets the permissions correctly as per the mentioned PR, this issue is about the ownership.
The service file isn't used in docker.

@r2ixuz
Copy link
Author

r2ixuz commented Dec 29, 2021

Don't know when or where a missing DB is created at container boot, but I guess chown for the DB is missing here: https://github.com/pi-hole/docker-pi-hole/blob/master/bash_functions.sh ?

@pralor-bot
Copy link

This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/error-while-deleting-diagnosis-entry/51814/20

@doodlemania2
Copy link

Thanks @yubiuser

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants