LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-06-2006, 09:28 AM   #1
joelhop
Member
 
Registered: Mar 2004
Location: Pennsylvania::USA
Distribution: Fedora Core 6
Posts: 100

Rep: Reputation: 15
Unhappy Bind include problems


I'm having problems getting include statements to work.

I am running fedora core 4, with the standard bind install.


I am using the default named.conf file which loads bind without a problem, and it has one include statement in it already:

include "/etc/rndc.key";

However, when I attempt to load a second include statement such as:

include "/etc/rndc.key";
include "/var/named/chroot/etc/acl.conf";

I get this error message when I attempt to load bind:

[root@localhost ~]# service named start
Starting named:
Error in named configuration:
/etc/named.conf:68: open: /var/named/chroot/etc/acl.conf: file not found
[FAILED]

The permissions on acl.conf are as follows:
-rw-r--r-- 1 root named 40 Jan 6 10:08 /var/named/chroot/etc/acl.conf

The permissions on rndc.key are as follows:
-rw-r--r-- 1 root named 132 Jan 5 14:54 /var/named/chroot/etc/rndc.key

Any Ideas? I don't understand how the file can't be found when i'm looking right at it.

-KARL
 
Old 01-06-2006, 10:07 AM   #2
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Since it seems to be in a "chroot jail", you may want to try using
"/etc/acl.conf" instead.

When a chroot jail is used, the "/" directory actually changes.
So if you chroot to /var/named/chroot/ then the new "/" directory is actually the
directory /var/named/chroot/. So, "/etc/acl.conf" in the chroot jail is the same as
/var/named/chroot/etc/acl.conf on your real filesystem.

Same goes for /etc/rndc.key. Your example clearly shows that the include of "rndc.key" is done inside
the chroot jail (since you've put /etc/rndc.key, not /var/named/chroot/etc/rndc.key, which would cause an error). Do the same for acl.conf and it should do the trick...
 
Old 01-06-2006, 10:19 AM   #3
joelhop
Member
 
Registered: Mar 2004
Location: Pennsylvania::USA
Distribution: Fedora Core 6
Posts: 100

Original Poster
Rep: Reputation: 15
Smile

Is there anyway I can remove the "chroot jail" so I can use absolute paths? I have several include files that have very specific paths such as /etc/smbind/smbind.conf being written to by apache.

-Karl
 
Old 01-09-2006, 02:00 AM   #4
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
First of all, the chroot jail you indicated seems to only apply to "named", the DNS server program.
Other programs, like Apache, may use a different jail or no jail at all.
The fact that you have a chroot jail for "named", doesn't mean you have the same jail for all your programs.

Secondly, even inside a jail, you can still use absolute paths. You just need to keep in mind that all files
need to be stored as if the chroot directory is your / directory.
For instance:
let's say I'm setting up a chroot jail in /my/chroot/.
Under this directory, I'll need to create subdirectories like "etc", "bin", etc, just like under the regular /
directory. Once I've chroot'ed to /my/chroot/, that directory will become my new "/" directory. All programs and files in the normal /etc/, /bin/, /usr/bin, ... will become unreachable.
But nothing prevents me from copying any files from the normal /etc/ to /my/chroot/etc/, from /bin to /my/chroot/bin (but you'll need to execute these copy operations before you chroot).

My final point is that your "named" chroot jail is probably in place for security.
Breaking out of it is not so easy and I strongly recommend against it (it defeats it's security purpose).
It may be possible to configure your DNS system to not use a chroot jail, but that can also cause security issues.
 
Old 01-10-2006, 08:32 PM   #5
joelhop
Member
 
Registered: Mar 2004
Location: Pennsylvania::USA
Distribution: Fedora Core 6
Posts: 100

Original Poster
Rep: Reputation: 15
Thumbs up Yeah

Yeah I just turned off the chroot jail in the install, works great now. I appreciate the security side of it, but it must work with smbind and phpmyadmin and a mysql database, there is far too much f*$king around to be playing with a chroot jail and relinking all the paths of these programs, i think i'll stick to good ol' /var/named for now.

-KARL
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cacti Installation Problems with include/config.php tovythomas Linux - Software 2 03-13-2007 06:49 PM
BIND Problems, please help! Gib Sandwich Linux - Networking 5 10-08-2004 06:54 AM
Linux: Problems with pow() from /usr/include/tgmath.h jimmy416 Programming 1 10-13-2003 05:43 PM
BIND problems Fuzzykitty Linux - Networking 4 06-28-2003 12:56 AM
Bind problems. KnightAbel Linux - Networking 1 04-07-2003 09:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration