PDA

View Full Version : DNS named permission error


Gazoo2
23rd January 2009, 03:25
I can use some help with a DNS issue, if someone can help.

I loaded a server, Ubuntu 8.04 LTS, added desktop-ubuntu to it and then followed the perfect server set up howto, and then set up DNS with the traditional DNS howto.

http://www.howtoforge.com/perfect-server-ubuntu8.04-lts
http://www.howtoforge.com/traditional_dns_howto

It seems I have a problem with permissions. In the setup I stopped apparmor, finished the set up and then when I had permission problems I removed apparmor.

Step 10

/etc/init.d/apparmor stop
update-rc.d -f apparmor remove

Jan 22 21:07:43 desktop named[19410]: starting BIND 9.4.2-P2 -u bind -t /var/lib/named
Jan 22 21:07:43 desktop named[19410]: found 1 CPU, using 1 worker thread
Jan 22 21:07:43 desktop named[19410]: loading configuration from '/etc/bind/named.conf'
Jan 22 21:07:43 desktop named[19410]: none:0: open: /etc/bind/named.conf: permission denied
Jan 22 21:07:43 desktop named[19410]: loading configuration: permission denied
Jan 22 21:07:43 desktop named[19410]: exiting (due to fatal error)
Jan 22 21:07:43 desktop kernel: [ 2261.717691] audit(1232676463.470:12): type=1503 operation="inode_permission" requested_mask="r::" denied_mask="r::" name="/var/lib/named/etc/bind/named.conf" pid=19411 profile="/usr/sbin/named" namespace="default"

Can any one tell me how to look for the problem and what I might do to correct the permission problem.

Edit: I did notice "mask=r" above and I guess that is what I changed with the following steps.

chmod 666 /var/lib/named/dev/null /var/lib/named/dev/random
chown -R bind:bind /var/lib/named/var/*
chown -R bind:bind /var/lib/named/etc/bind


EDIT: after a reboot bind/DNS worked, I guess apparmor was still there till the reboot.