Bind doesn't log to /var/log but will log to /etc/namedb

This is a really stupid problem I am having and I have spent about 2 hours trying to figure it out including reading other threads here. FreeBSD 8.1 running named

In my named.conf I have
Code:
logging {
category "default" { "debug"; };
category "general" { "debug"; };
category "database" { "debug"; };
category "security" { "debug"; };
category "config" { "debug"; };
category "resolver" { "debug"; };
category "xfer-in" { "debug"; };
category "xfer-out" { "debug"; };
category "notify" { "debug"; };
category "client" { "debug"; };
category "unmatched" { "debug"; };
category "network" { "debug"; };
category "update" { "debug"; };
category "queries" { "debug"; };
category "dispatch" { "debug"; };
category "dnssec" { "debug"; };
category "lame-servers" { "debug"; };
channel "debug" {
        file "/var/log/named/named.log" versions 3 size 50m;
#        file "/etc/namedb/named.log" versions 3 size 50m;
        print-time yes;
        print-category yes;
        };
};

You will see I have two log files which I alternate commenting on so I can try to figure out why one works and the other does not. I have touched both, chown'd both to bind:bind, and gave 774 to both. Bind will log to the second entry /etc/namedb/named.log. However, it will NOT log to the first entry /var/log/named/named.log

When I try logging to the first entry, I get:
Code:
Sep  2 14:10:23 ns1 named[76292]: logging channel 'debug' file '/var/log/named/named.log': file not found
Sep  2 14:10:23 ns1 named[76292]: isc_log_open '/var/log/named/named.log' failed: file not found

named is running as bind user:
Code:
ns1#ps ax -u | grep bind
bind  75709  0.0  4.8 32796 24392  ??  Ss    1:54PM   0:00.29 /usr/sbin/named -t /var/named -u bind

The directories and files exist with proper permissions:
Code:
ns1#ls -l /var/log
drwxrwxr--  2 bind  bind        512 Sep  2 13:55 named

ns1# ls -l /var/log/named/
total 0
-rwxrwxrwx  1 bind  bind  0 Sep  2 13:54 named.log


I am at a complete loss on this
 
/etc/namedb is a link to /var/named/etc/namedb
I guess bind will chroot into that directory and will not find your /var/log/named/named.log from there
 
Back
Top