Problems Chrooting under Bind 9

José Enrique Díaz Jolly enrique at podernet.com.mx
Mon Nov 4 19:56:05 UTC 2002


On Sat, 2 Nov 2002, Bill Smith wrote:

=>I'm trying to start up named using
=>
=>named -u named -g named -t /usr/local/etc.  That results in the message
=>below
=>
=># /usr/local/sbin/named -u named -g named -t /usr/local/etc
=>usage: named [-c conffile] [-d debuglevel] [-f|-g] [-n number_of_cpus]
=>             [-p port] [-s] [-t chrootdir] [-u username]
=>named: extra command line arguments

The -g flag now has another meaning:
 -g     Run the server in the foreground and force all log­
              ging to stderr.

Deppending how you compiled and which flags you used, there are a few thingas
you should notice while using -t flag. The use of -t flag is well explained in
the manual, it indicates the chrooted directory from where you are to run your
bind, then is the -c flag to provide the proper path (after chroot is done) to
your config file, remember that bind is tryinf to find named.conf in one of
several traditional paths such as /etc/named.conf then, if you have your named
conf try /usr/local/sbin/named -u named -t /usr/local/etc -c named.conf
if your named conf is in /usr/local/etc/named.conf and please also notice that
just after the flag -t /usr/local/etc this path "becomes root (/)" and
everything is directory relative to /usr/local/etc

If you have distributed your files under /usr/local and have named.conf in
/usr/local/etc and let's asume your data files under /usr/local/binddata
you should use the command like this

/usr/local/sbin/named -u named -t /usr/local -c etc/named.conf

and every path in named.conf should be relative to /usr/local


=>
=>I then try starting it w/out the -g flag and the following error is log to
=>messages on my system
=>
=>Nov  2 17:20:59 bind9 named[498]: [ID 866145 daemon.notice] starting BIND
=>9.2.1
=>-u named -t /usr/local/etc
=>Nov  2 17:20:59 bind9 named[498]: [ID 866145 daemon.error] none:0: open:
=>/usr/lo
=>cal/etc/named.conf: file not found
=>Nov  2 17:20:59 bind9 named[498]: [ID 866145 daemon.crit] loading
=>configuration:
=> file not found
=>Nov  2 17:20:59 bind9 named[498]: [ID 866145 daemon.crit] exiting (due to
=>fatal
=>error)
=>
=>The questions I have is why doesn't the -g work in the first example.  How
=>come named won't start when I just use -u and -t flags. /usr/local/etc is
=>where all config, etc files are located so not sure why it's complaining
=>there.
=>
=>Any insight would be appreciated
=>
=>Thanks,
=>
=>Bill
=>
=>
=>
=>

-- 

-- 'Tis true; there's magic in the web of it. --Othello (III.iv.69) ---

The river is within us, the sea is all about us.
===============================================================================
José Enrique Díaz Jolly				e-mail: enrique at podernet.com.mx
Podernet NOC - Systems Manager			  http://www.podernet.com.mx
Podernet +52 (55) 5257-0730			   icq: 14506020
===============================================================================
@(#) $Id: signature,v 1.1 2002/09/24 20:16:28 enrique Exp $



More information about the bind-users mailing list