You are not logged in.

#1 2020-07-15 11:58:11

stri
Member
Registered: 2014-06-09
Posts: 75

[SOLVED] PowerDNS system user sqlite3 permissions

I'm a beginner trying to set up powerdns using an sqlite3 database. The Arch linux package

https://www.archlinux.org/packages/comm … /powerdns/

creates a system user under which the process will be running.

I created the sqlite3 db with root, and then pdns complained that it can't write to the db. After chown'ing the db to the sysuser and putting it into /tmp, it worked.

Can you comment on which directory this sqlite db file should be stored, and which permissions in terms of safety it should have?

I vote for updating the wiki in this respect. I saw a user already requested addition of sqlite information, and I think many newbies will get stuck on the permission issue. At the time of writing, this is not documented in the official docs:

https://doc.powerdns.com/authoritative/ … lite3.html

Last edited by stri (2020-07-20 07:42:56)

Offline

#2 2020-07-16 15:30:30

loqs
Member
Registered: 2014-03-06
Posts: 19,057

Re: [SOLVED] PowerDNS system user sqlite3 permissions

I would suggest /var/lib/powerdns/powerdns.sqlite with 700 permissions on the directory and 600 on the file.
Edit:
See also `man 7 file-hierarchy`.

Last edited by loqs (2020-07-16 16:43:58)

Offline

#3 2020-07-20 07:41:54

stri
Member
Registered: 2014-06-09
Posts: 75

Re: [SOLVED] PowerDNS system user sqlite3 permissions

Great, thanks!

From the man page:

...
       /var/lib/
           Persistent system data. System components may place private data
           in this directory.
...

Offline

Board footer

Powered by FluxBB