Sqlite3 error

Just upgraded to the latest pihole version, which should be using sqlite3.
pihole-FTL.log has these lines:
[2017-06-17 11:46:58.621] Cannot open database: unable to open database file
[2017-06-17 11:46:58.621] Creating new (empty) database
[2017-06-17 11:46:58.622] Can't create database: unable to open database file
[2017-06-17 11:46:58.622] Database not available

I suspect it's a permissions thing. Running on a Raspberry Pi Zero W, with the latest Rspbian. I haven't modified anything in the pihole setup - it's whatever the install script created.

I'm guessing the DB file would go in /var/log, but I don't know the cleanest way to allow pihole-FTL to create a new file there.

Have you tried the solution posted here: Long-Term statistics for Pi-hole - #41 by DL6ER ?

Thanks - that fixed it.

Good to hear, thanks!

Just to add this: We place the file intentionally into /etc/pihole instead of /var/log, since many users have mounted /var/log as temporary filesystem and loose all its contents from time to time. With some distros (e.g. DietPi) this is even the default and they clear all the content once per hour.

It would somehow defeat the intended behavior :wink: