Hi,
I am running unbound 1.5.8 on ubuntu xenial. unbound doesn’t run remove the pid file after it’s stopped. I was expecting the pid file should be owned by unbound user as otherwise unbound probably wouldn’t be able to remove it; however, I didn’t see any permission errors from unbound logs. I even tried to changed the permission of the pid file after it’s created before stopping unbound that didn’t help.
root@DFW01-CPS02:~# service unbound start
- Starting DNS server unbound
[1520387664] unbound[60481:0] debug: increased limit(open files) from 1024 to 4140
[1520387664] unbound[60481:0] debug: creating udp4 socket 127.0.0.1 53
[1520387664] unbound[60481:0] debug: creating tcp4 socket 127.0.0.1 53
[1520387664] unbound[60481:0] debug: creating tcp6 socket ::1 8953
[1520387664] unbound[60481:0] debug: creating tcp4 socket 127.0.0.1 8953
[1520387664] unbound[60481:0] debug: switching log to syslog
…done.
root@DFW01-CPS02:~# ls -l /run/unbound.pid
-rw-r–r-- 1 root root 6 Mar 7 01:54 /run/unbound.pid
root@DFW01-CPS02:~# cat /run/unbound.pid
60482
root@DFW01-CPS02:~# ps -ef |grep unbound
root 60455 58318 0 01:54 pts/4 00:00:00 grep --color=auto -i unbound
unbound 60482 1 0 01:54 ? 00:00:00 /usr/sbin/unbound
root 60599 57970 0 01:55 pts/3 00:00:00 grep --color=auto unbound
root@DFW01-CPS02:~#
root@DFW01-CPS02:~# service unbound stop - Stopping DNS server unbound
…done.
root@DFW01-CPS02:~# cat /run/unbound.pid
60482
root@DFW01-CPS02:~# ps -ef |grep unbound
root 60455 58318 0 01:54 pts/4 00:00:00 grep --color=auto -i unbound
root 60627 57970 0 01:55 pts/3 00:00:00 grep --color=auto unbound
root@DFW01-CPS02:~#
root@DFW01-CPS02:~# dpkg -l unbound
Desired=Unknown/Install/Remove/Purge/Hold