FreeBSD 7.0-RELEASE-p12 bind9 log files not found

Prokofyev Vladislav v.prokofyev at gmail.com
Sat May 30 12:50:34 UTC 2009


Hello,

I have setup FreeBSD recently, can somebody help me with one interesting
thing - Bind9 slave DNS server, everything is works great, but I got a
problem with extended logging of xfer, etc.
Bind9 started in chroot:

root      788    0.0  0.1  3156  1004  ??  Ss   Fri01AM   0:02.10
/usr/sbin/syslogd -l /var/run/log -l /var/named/var/run/log -s
bind    30792  0.0  1.2 16212 12864  ??  Is    4:10PM   0:00.23
/usr/sbin/named -t /var/named -u bind


Configuration of logging channels from named.conf:

logging
{

    channel "xfer"
{

        file "/var/named/var/log/xfer.log" versions 3 size
10m;
        print-time
yes;

        print-severity
yes;

        severity
info;


};



    channel "lame"
{

        file "/var/named/var/log/lame.log" versions 2 size
10m;
        print-time
yes;

        print-severity
yes;

        severity
info;


};



    channel "config"
{

        file "/var/named/var/log/conf.log" versions 3 size
10m;
        print-time
yes;

        print-severity
yes;

        severity
info;


};



    channel "security"
{

        file "/var/named/var/log/security.log" versions 3 size
10m;
        print-time
yes;

        print-severity
yes;

        severity
info;


};




    category "xfer-in" { "xfer"; };
    category "xfer-out" { "xfer"; };
    category "notify" { "xfer"; };
    category "lame-servers" { "lame"; };
    category "config" { "config"; };
    category "security" { "security"; };
    category "default" { "default_syslog"; "default_debug"; };
};


Next, I've create files in /var/named/var/log and chown them to bind:wheel
(cause of -u bind is defined above):

[posix at mgork23-gw /var/named/var/log]$ ls -la
total 4
drwxr-xr-x  2 bind  wheel  512 May 30 16:09 .
drwxr-xr-x  6 root  wheel  512 May 21 19:16 ..
-rw-r--r--  1 bind  wheel    0 May 30 14:54 conf.log
-rw-r--r--  1 bind  wheel    0 May 30 14:55 lame.log
-rw-r--r--  1 bind  wheel    0 May 30 14:55 security.log
-rw-r--r--  1 bind  wheel    0 May 30 14:54 xfer.log


But I get following messages in /var/log/messages:

May 30 16:27:42 srv named[31139]: starting BIND 9.4.2 -t /var/named -u bind
May 30 16:27:42 srv named[31139]: command channel listening on 127.0.0.1#953
May 30 16:27:42 srv named[31139]: command channel listening on ::1#953
May 30 16:27:42 srv named[31139]: logging channel 'xfer' file
'/var/named/var/log/xfer.log': file not found
May 30 16:27:42 srv named[31139]: logging channel 'lame' file
'/var/named/var/log/lame.log': file not found
May 30 16:27:42 srv named[31139]: logging channel 'config' file
'/var/named/var/log/conf.log': file not found
May 30 16:27:42 srv named[31139]: logging channel 'security' file
'/var/named/log/security.log': file not found
May 30 16:27:42 srv named[31139]: running
May 30 16:27:42 srv named[31139]: isc_log_open '/var/named/var/log/xfer.log'
failed: file not found


Changing permissions and putting log-files in different places (with
changing paths in named.conf of course) has no effect. I see that problem is
pretty silly but searching info about this doesn't say something special - I
still got "file not found" in /var/messages.
Maybe Iam don't understand where files must be placed, so, thanks in advance
for everybody who can explain how it works :)

VP
v.prokofyev at gmail.com


More information about the freebsd-questions mailing list