Find the answer to your Linux question:
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 25
[root@poirot ~]# dig @127.0.0.1 version.bind txt ch ; <<>> DiG 9.2.4 <<>> @127.0.0.1 version.bind txt ch ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Apr 2005
    Location
    Lucasvile, OH
    Posts
    19

    Command results


    [root@poirot ~]# dig @127.0.0.1 version.bind txt ch

    ; <<>> DiG 9.2.4 <<>> @127.0.0.1 version.bind txt ch
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8479
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;version.bind. CH TXT

    ;; ANSWER SECTION:
    version.bind. 0 CH TXT "9.2.4"

    ;; Query time: 63 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Thu Apr 21 14:13:12 2005
    ;; MSG SIZE rcvd: 48

    [root@poirot ~]# ps -Af | grep 'named'
    named 1705 1 0 13:57 ? 00:00:00 /usr/sbin/named -u named -t /var/named/chroot
    root 2751 2723 0 14:13 pts/1 00:00:00 grep named
    [root@poirot ~]# named-checkconf /etc/named.conf
    [root@poirot ~]#

  2. #12
    Linux Newbie
    Join Date
    Mar 2005
    Posts
    230
    hm, let's check that config file the right way.

    named-checkconf -t /var/named/chroot /etc/named.conf

    That probably won't turn up any errors. So let's change these lines:

    category default { sys_log; };
    category statistics { sys_log; log_file; };

    To this line: (the default category should include whatever statistics is)

    category default { log_file; };

    Also, we'll make sure the directory exists, and that BIND can write to it:

    mkdir /var/named/chroot/var/log
    chmod 770 /var/named/chroot/var/log
    chown named:named /var/named/chroot/var/log

    Then reload the config:

    rndc reload

    Then show me the results for:

    tail /var/named/chroot/var/log/named.msgs

  3. #13
    Just Joined!
    Join Date
    Apr 2005
    Location
    Lucasvile, OH
    Posts
    19

    Progress

    I don't understand this, but I rebooted the server and things got better. I'm now at least getting some info about the nature of my problem. Still don't understand though.

    In /var/log/messages, I'm getting the following error (by the way, I moved the file) when named starts...

    Apr 21 18:30:18 poirot named[1715]: isc_log_open '/var/named/named.msgs' failed: permission denied

    It is followed by a bunch of error messages that all look a great deal like:

    Apr 21 18:34:31 poirot kernel: audit(1114122871.918:0): avc: denied { append } for pid=1724 exe=/usr/sbin/named name=named.msgs dev=dm-0 ino=141965 scontext=user_u:system_r:named_t tcontext=root:object_r:named_zone_t tclass=file

    Evidently, the system has some retries built into it and it generates the same error over and over again.

    OK, why the error?

    Good question! I look at the directory and even created the file name to make sure it was OK to append. Here's that:

    [root@poirot named]# cd /var/named/chroot/var/named/
    [root@poirot named]# ls -ld
    drwxrwx--- 4 root named 4096 Apr 21 18:18 .
    [root@poirot named]# ls -l
    total 92
    drwxrwx--- 2 named named 4096 Apr 21 09:09 data
    -rwxrwx--- 1 root named 599 Apr 21 17:31 db.10
    -rwxrwx--- 1 root named 631 Apr 21 17:31 db.ziklag.net
    -rwxrwx--- 1 root named 198 Aug 25 2004 localdomain.zone
    -rwxrwx--- 1 root named 195 Aug 25 2004 localhost.zone
    -rwxrwx--- 1 root named 415 Aug 25 2004 named.broadcast
    -rwxrwx--- 1 root named 2518 Aug 25 2004 named.ca
    -rwxrwx--- 1 root named 432 Aug 25 2004 named.ip6.local
    -rwxrwx--- 1 root named 433 Aug 25 2004 named.local
    -rw-rw-rw- 1 root named 0 Apr 21 18:18 named.msgs
    -rwxrwx--- 1 root named 416 Aug 25 2004 named.zero
    drwxrwx--- 2 named named 4096 Jul 27 2004 slaves

    Just to be sure, I thought I'd look at /var/named

    [root@poirot named]# cd /var/named
    [root@poirot named]# ls -ld
    drwxrwx--- 5 root named 4096 Apr 21 18:52 .
    [root@poirot named]# ls -l
    total 72
    drwxrwx--- 5 root named 4096 Apr 10 07:18 chroot
    drwxrwx--- 2 named named 4096 Oct 18 2004 data
    -rwxrwx--- 1 root named 599 Apr 19 18:10 db.10
    -rwxrwx--- 1 root named 631 Apr 20 16:07 db.ziklag.net
    lrwxrwxrwx 1 root root 44 Apr 10 07:19 localdomain.zone -> /var/named/chroot/var/named/localdomain.zone
    lrwxrwxrwx 1 root root 42 Apr 10 07:19 localhost.zone -> /var/named/chroot/var/named/localhost.zone
    lrwxrwxrwx 1 root root 43 Apr 10 07:19 named.broadcast -> /var/named/chroot/var/named/named.broadcast
    lrwxrwxrwx 1 root root 36 Apr 10 07:19 named.ca -> /var/named/chroot/var/named/named.ca
    lrwxrwxrwx 1 root root 43 Apr 10 07:19 named.ip6.local -> /var/named/chroot/var/named/named.ip6.local
    lrwxrwxrwx 1 root root 39 Apr 10 07:19 named.local -> /var/named/chroot/var/named/named.local
    lrwxrwxrwx 1 root root 38 Apr 21 18:52 named.msgs -> /var/named/chroot/var/named/named.msgs
    lrwxrwxrwx 1 root root 38 Apr 10 07:19 named.zero -> /var/named/chroot/var/named/named.zero
    drwxrwx--- 2 named named 4096 Oct 18 2004 slaves

    OK, so named should definitely be able to write to this file no matter where it is. Why can it not? WTFO?

    Ideas?

  4. #14
    Linux Newbie
    Join Date
    Mar 2005
    Posts
    230
    Try running this command:

    chown named:named /var/named/chroot/var/named/*

  5. #15
    Just Joined!
    Join Date
    Apr 2005
    Location
    Lucasvile, OH
    Posts
    19

    Done

    Done! No change. Guesses?

  6. #16
    Linux Newbie
    Join Date
    Mar 2005
    Posts
    230
    Show me the results for the following commands:

    ls -ld /var
    ls -ld /var/named
    ls -ld /var/named/chroot
    ls -ld /var/named/chroot/var
    ls -ld /var/named/chroot/var/named

  7. #17
    Just Joined!
    Join Date
    Apr 2005
    Location
    Lucasvile, OH
    Posts
    19

    Still stumped

    [root@poirot var]# ls -ld /var
    drwxr-xr-x 20 root root 4096 Apr 10 07:18 /var
    [root@poirot var]# ls -ld /var/named
    drwxrwx--- 5 named named 4096 Apr 21 18:52 /var/named
    [root@poirot var]# ls -ld /var/named/chroot
    drwxrwx--- 5 named named 4096 Apr 10 07:18 /var/named/chroot
    [root@poirot var]# ls -ld /var/named/chroot/var
    drwxrwx--- 6 named named 4096 Apr 21 17:58 /var/named/chroot/var
    [root@poirot var]# ls -ld /var/named/chroot/var/named
    drwxrwx--- 4 named named 4096 Apr 21 18:18 /var/named/chroot/var/named

  8. #18
    Linux Newbie
    Join Date
    Mar 2005
    Posts
    230
    Let's try making our configurations identical when it comes to logging.

    mkdir /var/named/chroot/var/named/log
    chown named:named /var/named/chroot/var/named/log
    chmod 770 /var/named/chroot/var/named/log

    Change named.conf so that your logging channel points to:

    /var/named/log/named.msgs

    Then run this command:

    service named restart

  9. #19
    Just Joined!
    Join Date
    Apr 2005
    Location
    Lucasvile, OH
    Posts
    19

    Done

    Made requested changes. Same results.

  10. #20
    Linux Newbie
    Join Date
    Mar 2005
    Posts
    230
    Let's see your named.conf again.

Page 2 of 3 FirstFirst 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •