I have a master name server set up and now I am trying to configure the slave. Bind9 appears to load and run fine, however I am getting the following error:

Apr 27 12:47:21 ns2 named[23563]: dumping master file: slaves/tmp-oJ5LJ1RtO4: open: file not found

Here is my named.conf.options file:

options {

recursion yes;
allow-recursion { trusted; };
listen-on {; }; //this machines IP. 
allow-transfer { none; };

// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk.  See http://www.kb.cert.org/vuls/id/800113

// If your ISP provided one or more IP addresses for stable 
// nameservers, you probably want to use them as forwarders.  
// Uncomment the following block, and insert the addresses replacing 
// the all-0's placeholder.

forwarders {;
    x.x.x.x; //keeping my ISPs nameservers private for post in askUbunutu
    x.x.x.x; //

// If BIND logs error messages about the root key being expired,
// you will need to update your keys.  See https://www.isc.org/bind-keys
dnssec-validation auto;

auth-nxdomain no;    # conform to RFC1035
listen-on-v6 { any; };


Slaves named.conf.local file:

// Do any local configuration here

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "mycity.example.com" {
type slave;
file "slaves/db.mycity.example.com";
masters {; };

zone "1.0.10.in-addr.arpa" {
    type slave;
    file "slaves/db.10";
    masters {; };

Directory permissions for /etc/bind/slaves

drwxr-sr-x   2 bind bind  4096 Apr 27 09:41 slaves

Any idea what I am doing wrong?

1 Answer 1


The file directive is relative to the bind var directory on ubuntu that defaults to the following:


That is unless changed using the directory directive in options, thus it is looking for the following directory to save the data:


Note this is probably a better location anyway really it's not ideal to give bind write access to it's own /etc directory since doing so allows someone to potentially alter your bind configuration if they somehow exploit bind safer to keep variable data somewhere else and let the server write there.

  • Thank you Sir! I will try that but what should the permissions be for the slaves directory?
    – Peter S
    Apr 27, 2016 at 21:24
  • Getting this error now: dumping master file: slaves/tmp-TI8XpgptmN: open: file not found ... with these permissions: drwxr-xr-x 2 root bind 4096 Apr 27 14:25 slaves
    – Peter S
    Apr 27, 2016 at 21:26
  • The permissions you have will be fine just place it under /var/cache/bind instead personally just find it good practice not to have deamons having write access to their own configuration directory or a subpath of it.
    – MttJocy
    Apr 27, 2016 at 21:26
  • Should it be bind:bind for permissions? That shouldnt matter right? Also, why is it still saying file not found?. Ok I changed permissions to bind:bind and its still not working ;'(
    – Peter S
    Apr 27, 2016 at 21:29
  • It's because the slaves directory is not being found at /var/cache/bind/slaves thus it can't create the temporary file at /var/cache/bind/slaves/tmp-xxxxxxxxxx to store the transferred zone. Bind first creates a temporary file in the same directory then copies it to the defined filename from the config only after the transfer is completed stops it losing data if the transfer fails partway.
    – MttJocy
    Apr 27, 2016 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.