gamelinux / passivedns

A network sniffer that logs all DNS server replies for use in a passive DNS setup
http://gamelinux.org/
1.67k stars 372 forks source link

Permissions for /var/run/passivedns/passivedns.pid running as non-root #117

Open rvaglid opened 4 years ago

rvaglid commented 4 years ago

Hi there, we're running passivedns on RH7, but after each reboot folder /var/run/passivedns does not get automatically recreated. The /var/run (symlinked to /run in RH/Fedora) is a tmpfs, so these folders are non-persistent.

Is there a workaround for this? I assume this is more a RH issue than a passivedns issue.

Cheers, Rolf

gamelinux commented 4 years ago

Maybe this: https://serverfault.com/questions/779634/create-a-directory-under-var-run-at-boot

rvaglid commented 4 years ago

Thanks for the link Edward, that points to the exact same issue. However we're starting passivedns using sysV/init and not systemd, so I ended up adding the following under the start function in /etc/init.d/passivedns:

function start(){ mkdir /run/passivedns/ chown -R user.group /run/passivedns/ daemon $prog etc..