SCIENTIFIC-LINUX-USERS Archives

July 2011

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Todd And Margo Chester <[log in to unmask]>
Reply To:
Todd And Margo Chester <[log in to unmask]>
Date:
Fri, 22 Jul 2011 18:45:41 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (68 lines)
Hi Guys,

   sl6, 64 bit
   bind
   bind-chroot

I am trying  to migrate my DNS (bind, named) over from Cent OS 5.6
to SL 6.  (Yes, I am a refugee who liked the SL community and decided
to stay.)  When I try starting /etc/rc.d/init.d/named, I get

       # service named start
       Starting named:
       Error in named configuration:
       none:0: open: /etc/named.conf: permission denied

There is no permission problem.  (Setting named.conf to 2777
proved that.)

I have isolated the problem down to this line of code in
../init.d/named:

        if [ -x /usr/sbin/named-checkconf ] && \
           [ -x /usr/sbin/named-checkzone ] &&  \
           /usr/sbin/named-checkconf $ckcf_options ${named_conf} 
 >/dev/null 2>&1; then

Placing the following proofing statements in ..init.d/named:

        echo ""
        echo "you are here"
        echo "`whoami`"
        if [ -x /usr/sbin/named-checkconf ]; then echo "yes"; else echo 
"no"; fi
        if [ -x /usr/sbin/named-checkzone ]; then echo "yes"; else echo 
"no"; fi
        /usr/sbin/named-checkconf $ckcf_options ${named_conf}; echo $?

gives:

        you are here
        root
        yes
        yes
        + /usr/sbin/named-checkconf -z -t /var/named/chroot /etc/named.conf
        none:0: open: /etc/named.conf: permission denied
        1

So the problem is specifically:

        /usr/sbin/named-checkconf -z -t /var/named/chroot /etc/named.conf

Now here is the rub.  If I run the above command as the same user (root)
from the command line, it works!

         # /usr/sbin/named-checkconf -z -t /var/named/chroot 
/etc/named.conf; echo  $?
         zone foo.local/IN: loaded serial 100
         zone 255.168.192.in-addr.arpa/IN: loaded serial 100
         zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
         0

[Editorial comment]  AAAAAAAAHHHHHHHHHHHHH!!!!! [/editorial comment]

Help!

Many thanks,
-T

ATOM RSS1 RSS2