Page 1 of 1

zone example.com/IN: loading from master file /home/admin/conf/dns/example.com.db failed: permission denied

Posted: Sat Nov 28, 2015 12:31 pm
by aximus
Bind refuses to load the zone configuration files. In the log files i see:

Code: Select all

zone example.com/IN: loading from master file /home/admin/conf/dns/example.com.db failed: permission denied
Permissions seem fine:

Code: Select all

root@ns:/home/admin/conf/dns# ll
total 12
drwxr-x--x 2 root root 4096 Nov 28 13:09 ./
drwxr-xr-x 5 root root 4096 Nov  9 19:10 ../
-rw-r----- 1 root bind  645 Nov 28 13:09 example.com.db
Also bind seems to run fine:

Code: Select all

root@ns:/home/admin/conf/dns# ps aux | grep bind
bind     16679  0.0  0.3 238688 13692 ?        Ssl  13:18   0:00 /usr/sbin/named -u bind
root     17918  0.0  0.0  11740   936 pts/2    S+   13:33   0:00 grep --color=auto bind
In my search for solutions, i've copied the example.com.db file to /etc/bind, and changed /etc/bind/named.conf accordingly, and then it works. But that way, i'm no longer able to manage the settings using the control panel.

I have a fresh installation of VestaCP 0.9.8-15 on Ubuntu 14.

(real domain name replaced by example.com above)

Re: zone example.com/IN: loading from master file /home/admin/conf/dns/example.com.db failed: permission denied

Posted: Sun Nov 29, 2015 5:34 pm
by mephivio
same problem !
any solution ?

Re: zone example.com/IN: loading from master file /home/admin/conf/dns/example.com.db failed: permission denied

Posted: Tue Dec 01, 2015 10:30 pm
by avivco94
I have found solution for this problem.

In /etc/apparmor.d/usr.sbin.named
Add this line

Code: Select all

/home/** rwm,
Underneath

Code: Select all

/etc/bind/** rw,

Re: zone example.com/IN: loading from master file /home/admin/conf/dns/example.com.db failed: permission denied

Posted: Sun Dec 06, 2015 10:52 am
by aximus
avivco94 wrote:I have found solution for this problem.

In /etc/apparmor.d/usr.sbin.named
Add this line

Code: Select all

/home/** rwm,
Underneath

Code: Select all

/etc/bind/** rw,
Thanks! This solution works. For those who try, you should also restart apparmor:

Code: Select all

service apparmor restart
as root.