This is strange. I use a mix of your suggestions in the logging section:
Code:
logging {
channel "logfile" {
file "/var/log/named/named.log" versions 5 size 5m;
print-time yes;
print-severity yes;
print-category yes;
};
category "default" { "logfile"; };
category "general" { "logfile"; };
category "update" { "logfile"; };
category "queries" { "logfile"; };
};
As Technoslave suggested, I created a directory like this
Code:
[root@larsdell named]# ls -al /var/log/named
total 16
drwxr-xr-x 2 named named 4096 Apr 30 16:46 .
A reboot followed by a 'service named stop' and 'service named start' three minutes later, resulted in the following:
Code:
[root@larsdell ~]# tail -n 500 /var/log/messages | grep named
Apr 30 17:19:35 localhost named[3393]: starting BIND 9.2.5 -u named -t /var/named/chroot
Apr 30 17:19:35 localhost named: named startup succeeded
Apr 30 17:22:14 localhost named: succeeded
Apr 30 17:22:22 localhost named[5137]: starting BIND 9.2.5 -u named -t /var/named/chroot
Apr 30 17:22:22 localhost named[5137]: using 1 CPU
Apr 30 17:22:22 localhost named[5137]: loading configuration from '/etc/named.conf'
Apr 30 17:22:22 localhost named[5137]: listening on IPv4 interface lo, 127.0.0.1#53
Apr 30 17:22:22 localhost named[5137]: listening on IPv4 interface eth0, 129.241.151.90#53
Apr 30 17:22:22 localhost named[5137]: command channel listening on 127.0.0.1#953
Apr 30 17:22:22 localhost named[5137]: logging channel 'logfile' file '/var/log/named/named.log': file
not found
Apr 30 17:22:22 localhost named[5137]: isc_log_open '/var/log/named/named.log' failed: file not found
Apr 30 17:22:22 localhost named: named startup succeeded
[root@larsdell ~]# ls -l /var/log/named/named.log
-rw-r--r-- 1 named named 0 Apr 30 17:11 /var/log/named/named.log
1. Can someone explain to me why these two different outcomes appears?
I think I've tried both, but anyway:
2. Should I 'touch', 'chown' and 'chmod' manually to create the file or will named create the file itself if necessary?
3. Just to be sure, the user 'named' is always running the process 'named', no matter which user is logged in?
The service named starts automatically in runlevel 5.
Code:
[root@larsdell named]# ps aux | grep named
named 16066 0.0 1.0 37752 2728 ? Ssl 16:46 0:00 /usr/sbin/named -u named -t /var/named/chroot