Should I use /etc/bind/zones/ or /var/cache/bind/?

Posted by nbolton on Server Fault See other posts from Server Fault or by nbolton
Published on 2009-11-16T14:07:51Z Indexed on 2010/03/30 2:43 UTC
Read the original article Hit count: 586

Filed under:
|

Each tutorial seems to have a different opinion on this. For my ISC BIND zones, should I use /etc/bind/zones/ or /var/cache/bind/? In the last install, I used /var/cache/bind/ but only because I was guided to do so; however I just spotted a pid file in there for this new Debian install, so I figured that using the "working directory" to store zone files probably wasn't the best idea. It seems that many admins use this so they don't have to type the full path when declaring a new zone.

For example:

file "/etc/bind/zones/db.foobar.com";

Instead of:

file "db.foobar.com";

Is obviously easier to type, but is it good or bad practice?

Some may also suggest setting the working directory to /etc/bind/zones:

options {
    // directory "/var/cache/bind";
    directory "/etc/bind/zones";
}

... but something tells me this isn't good practice, since the pid file would be created there I assume (unless it's just in /var/cache/bind by coincidence).

I took a look at the manpage but it didn't seem to say what the directory option was for, any ideas exactly what it was design for?

© Server Fault or respective owner

Related posts about bind

Related posts about named-conf