Why does BIND create a new pid file on conf. reload?

Jari Takkala jari at infid.net
Fri Dec 7 01:32:50 UTC 2001



Hello,

It seems that if I use ndc to reload the configuration for named, BIND will 
try and update the pid file, even though the PID of named does not change.

Whereas, if I do 'ndc restart -u bind -g bind', named will restart and create 
the pid file as root, chown()'ing it to the user id and group id specified on 
the command line, before setuid()'ing to user bind. 

Why does named bother to attempt to create a new pid file if its own PID does 
not change (ie. if executing 'ndc reload')? If I am running named as another 
user, such as 'bind', then it will fail to create the new PID file as named 
does not have permission to unlink /var/run/named.pid. This results in 
entries such as the following in my log files:

Dec  6 19:12:48 lithium named[232]: couldn't create pid file' 
/var/run/named.pid'

Does anyone else think that this is a bug, or am I missing something?

Here are my configuration details:
named version 8.2.4-REL, run as 'named -u bind -g bind'

> ls -ld /var/run
drwxr-xr-x  3 root  wheel  512 Dec  6 20:22 /var/run

> ls -l /var/run/named.pid 
-rw-r--r--  1 bind  bind  5 Dec  6 19:22 /var/run/named.pid

Regards,

Jari Takkala

-- 
Jari Takkala
Senior UNIX Administrator and Network Engineer
tel: +1 416-894-8649
fax: +1 416-222-7748
email: jari at infid.net


More information about the bind-users mailing list