LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 02-02-2004, 01:14 PM   #1
adam_lang
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Rep: Reputation: 0
Bind/named can't open zone files for some reason


So, we're switching our main DNS over to a new system. The old one ran RH7.3 and the new one is 9.0. After a bit of twiddling, I decided it was easiest to just type all of the stuff into redhat-config-bind rather than trying to move over the files, given that they're different versions of bind (and redhat-config-bind) and so forth.

I have set the new machine up identically with the old one, as far as I can see. Bind is run -u named (that is, as the user named.) The / and /var directories are readable and executable by everyone, and /var/named is owned by named. All the files in /var/named are owned by named, and are read/write by user and readable by everyone else.

However, when I start up named, I get the following in the log: (Note that the moos and the foos and so forth are for disguising purposes)

Feb 2 10:44:20 public named[10495]: starting BIND 9.2.1 -u named
Feb 2 10:44:20 public named[10495]: using 4 CPUs
Feb 2 10:44:20 public named[10495]: loading configuration from '/etc/named.conf'
Feb 2 10:44:20 public named[10495]: no IPv6 interfaces found
Feb 2 10:44:20 public named[10495]: listening on IPv4 interface lo, 127.0.0.1#53
Feb 2 10:44:20 public named[10495]: listening on IPv4 interface eth0, moo.moo.moo.moo#53
Feb 2 10:44:20 public named[10495]: command channel listening on 127.0.0.1#953
Feb 2 10:44:20 public named[10495]: zone 0.0.127.in-addr.arpa/IN: loading master file 0.0.127.in-addr.arpa.zone: permission denied
Feb 2 10:44:20 public named[10495]: zone moo.moo.moo.in-addr.arpa/IN: loading master file moo.moo.moo.in-addr.arpa.zone: permission denied
Feb 2 10:44:20 public named[10495]: zone foo.com/IN: loading master file foo.com.zone: permission denied
Feb 2 10:44:20 public named[10495]: zone bar.com/IN: loading master file bar.com.zone: permission denied
Feb 2 10:44:20 public named[10495]: zone bar.co.jp/IN: loading master file bar.co.jp.zone: permission denied
Feb 2 10:44:20 public named[10495]: zone localhost/IN: loading master file localhost.zone: permission denied
Feb 2 10:44:20 public named[10495]: running


Now, if I go into the /etc/named.conf file and I change all of the entries from something like this:
zone "localhost" {
type master;
file "localhost.zone";
};

into something like this:
zone "localhost" {
type master;
file "/var/named/localhost.zone";
};

then it WORKS FINE.

Yes, I'm sure that / and /private and /var are all publicly readable and executable, and that named is running as user named.

Now, that would be a solution to my problem, except that every time someone plays with redhat-config-bind, it resets those paths back to the simple filename again, and things stop working again. And we have to play with our name server fairly frequently, and there's more than one of us, and trust me when I say that things are just going to stop working if I use this, so I really want to figure out what's ACTUALLY wrong.

Oh, and no, I'm not using any fancy-schmancy change-of-root settings for this. (Of course, if I were, /etc/named.conf probably wouldn't be found either.)

Any clues, anyone?

--Adam Lang
 
Old 02-02-2004, 03:12 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Do you have an option in named.conf such as...

directory "/var/named";

?

It seems that you are probably missing that piece.
 
Old 02-02-2004, 09:09 PM   #3
adam_lang
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you. I figured it was that simple, but I had no idea what it was. Nor why it wasn't there by default.

--Adam Lang
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind tool for automatically generating reverse zone files p0rt Linux - General 0 01-07-2005 04:33 AM
changing SOAs in named with large numbers of zone files untoldone Linux - Networking 3 08-17-2004 02:35 PM
Question about zone files.... (BIND) WeNdeL Linux - Newbie 1 01-24-2003 04:05 PM
Bind and DNS information conf files and zone files aaronluke Linux - General 1 10-13-2002 09:41 AM
Bind Zone files cbutler Linux - Networking 0 01-08-2002 04:41 PM


All times are GMT -5. The time now is 05:15 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration