View Single Post
  #7  
Old 7th December 2005, 16:27
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

Quote:
drwxr-x--- 4 root named 4096 Dec 7 11:36 /var/named/
drwxrwx--- 5 root named 4096 Aug 18 10:39 /var/named/chroot/
drwxrwx--- 5 root named 4096 Aug 18 10:39 /var/named/chroot/var/
drwxr-x--- 4 root named 4096 Dec 7 12:24 /var/named/chroot/var/named/
That's why realpath() fails: the directories can't be read by anyone else than root and named because of the permissions. If you changed the directories' permissions so that they can be read by anyone then realpath() would work.

Quote:
I am a bit unclear on why you are using realpath at all though.
To prevent users from typing in wrong paths, etc.

Quote:
However, with the use of realpath() in ISPConfig /var/named/data is expanded to /var/named/chroot/var/named/data. This is written to /etc/named.conf. As BIND attempts to start it can't find the chroot directory in its chroot jail. The fix for this, without changing the ISPConfig source code, is to make an extra symlink in BIND's chroot jail:

Code:
ln -s / /var/named/chroot/var/named/chroot
That's what I describe in the Fedora tutorials ( http://www.howtoforge.com/perfect_se...dora_core_4_p3 and http://www.howtoforge.com/perfect_se...dora_core_3_p3 ):

Code:
chmod 755 /var/named/
chmod 775 /var/named/chroot/
chmod 775 /var/named/chroot/var/
chmod 755 /var/named/chroot/var/named/
chmod 775 /var/named/chroot/var/run/
chmod 777 /var/named/chroot/var/run/named/
cd /var/named/chroot/var/named/
ln -s ../../ chroot
Fedora and CentOS are very similar.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote