chroot - help

Jim Popovitch jimpop at yahoo.com
Thu Jan 6 07:27:27 UTC 2005


On Wed, 2005-01-05 at 22:21 -0800, saravanan ganapathy wrote:
> hai ,
>   I am using bind9.2 on debian with chroot config. 
> 
> My Probs
> 
>   If I want to write querylog in /var/log/querylog, I
> have to give this in named.conf.Assume my chroot path
> is /opt/named.So that it writes on
> /opt/named/var/log/querylog. 
> 
> But I want to have log files on /var/named (not
> /opt/dns/var/named). How to do it?

Named is running inside the chroot environment and therefore has no
access to the real /var/log.  

Why not use "option query-log" and let syslog handle it?  On Debian you
would need to edit /etc/init.d/sysklogd and modify SYSLOGD to include
"-a /opt/named/dev/log".  After restarting syslog, you will see a "log"
device at /opt/named/dev/log which named will use.

More details on setting syslog up to work with chrooted environments is
detailed inside the Chroot-BIND HOWTO
(http://www.linuxlookup.com/html/HOWTO/html/Chroot-BIND-HOWTO.html)

hth,

-Jim P.



More information about the bind-users mailing list