![]()  | ![]()  | 
If you do change the location of the files written by the name server (named.pid, named_dump.db, or named.stats), for security reasons, you should choose a directory that is not world-writable. While we don't know of any break-ins caused by writing these files, you should follow this guideline just to be safe.
named.pid's full path is usually /var/run/named.pid or /etc/named.pid. One reason you might change the default location of this file is if you find yourself running more than one name server on a single host. (Yikes! Why would someone do that?) Chapter 10, "Advanced Features", gives an example of running two name servers on one host. You can specify a different named.pid file in the configuration file for each server:
options { pid-file "server1.pid"; };
named-xfer's path is usually
/usr/sbin/named-xfer or
/etc/named-xfer. You'll remember that
named-xfer is used by a slave name server for
inbound zone transfers. One reason you might change the default
location is to build and test a new version of BIND in a local
directory -- your test version of named can
be configured to use the local version of named-xfer
:
options { named-xfer "/home/rudy/named/named-xfer"; };
Since BIND 9 doesn't use named-xfer, of
course, there's not much call for this substatement with BIND
9.The name server writes named_dump.db into its current directory (BIND 8 or 9) when you tell it to dump its database. Here's an example of how to change the location of the dump file:
options { dump-file "/home/rudy/named/named_dump.db"; };
The name server writes named.stats into its
current directory (BIND 8 or 9.1.0 and later) when you tell it to
dump statistics. Here's an example of how to change its
location:
options { statistics-file "/home/rudy/named/named.stats"; };