LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 06-27-2011, 12:36 PM   #1
savona
Member
 
Registered: Mar 2011
Location: Bellmawr, NJ
Distribution: Red Hat / Fedora
Posts: 194

Rep: Reputation: 50
bind chroot - the working directory is not writable


I have just installed RHEL 6 and installed bind-chroot via yum.

I am trying to configure everything to match our old servers. Everything seems find except I keep receiving the following error in /var/log/messages:

Jun 27 12:28:54 intns1 named[13175]: the working directory is not writable

In the bind log I am also seeing:


27-Jun-2011 12:30:00.979 general: error: dumping master file: tmp-mpFV9Kjw1k: open: permission denied


Which I am assuming is because the working dir is not writeable.


Why working directory is set:

options {
directory "/var/named/data";

It seems to be writable:

drwxrwx---. 2 named named 4096 May 27 06:38 data



Any help would be appreciated.
 
Old 06-27-2011, 01:14 PM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Hi,

If you have installed bind-chroot, then in your case the working directory is /var/named/chroot/var/named/data.
The 1st part (/var/named/chroot) is the jail under which named operates and the 2nd (/var/named/data) is the one defined by the "directory" option in named.conf
Take a look at this howto for details

Regards
 
Old 06-27-2011, 02:13 PM   #3
savona
Member
 
Registered: Mar 2011
Location: Bellmawr, NJ
Distribution: Red Hat / Fedora
Posts: 194

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by bathory View Post
Hi,

If you have installed bind-chroot, then in your case the working directory is /var/named/chroot/var/named/data.
The 1st part (/var/named/chroot) is the jail under which named operates and the 2nd (/var/named/data) is the one defined by the "directory" option in named.conf
Take a look at this howto for details

Regards
I understand what your saying, but since bind is running in the chroot it only needs the "2nd" part correct?

For example I am using /var/named/chroot as the jail, and /var/named/data as the working directory.

drwxrwx---. 2 named named 4096 Jun 27 11:53 /var/named/chroot/var/named/data

But it still says its not writable.
 
Old 06-27-2011, 03:02 PM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Then I guess it's SELinux
I'm not running RHEL, but I guess
Code:
chcon -R system_u:object_r:named_cache_t /var/named/chroot
should work.
You may take a look here for details.

Regards
 
1 members found this post helpful.
Old 06-28-2011, 09:36 AM   #5
savona
Member
 
Registered: Mar 2011
Location: Bellmawr, NJ
Distribution: Red Hat / Fedora
Posts: 194

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by bathory View Post
Then I guess it's SELinux
I'm not running RHEL, but I guess
Code:
chcon -R system_u:object_r:named_cache_t /var/named/chroot
should work.
You may take a look here for details.

Regards
Thanks a million, it turned out it was selinux. I should have thought of that.

I used audit2allow to create a policy from the audit log, now everything is working correctly.
 
Old 06-28-2011, 11:32 AM   #6
lazydog
Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Kubuntu Sabayon Peppermint
Posts: 46

Rep: Reputation: 4
By default SELinux on RH only allows writing to the slave directory.
 
  


Reply

Tags
bind, named, rhel 6


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
rhel5 bind9 the working directory is not writable sank1800 Linux - Server 1 02-19-2010 05:42 PM
named - the working directory is not writable Toadman Linux - Server 7 01-08-2010 11:24 AM
world writable directory? turbo_acura Linux - Software 8 10-17-2009 08:02 AM
mount command not working in chroot. and now chroot not working mohit.jain Linux From Scratch 5 07-14-2006 04:57 AM
Sendmail Group Writable Directory flipcode Linux - Security 0 12-23-2004 04:41 PM


All times are GMT -5. The time now is 03:15 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration