Page 1 of 1

No user conf dns directory

Posted: Wed May 06, 2020 10:49 pm
by bryank
I am using bind9 on Ubuntu 18.04.

I have attempted to create a domain; however, the file for the domain is not being created. Looking into it, the dns directory is missing from the conf directory.

I am unable to make any changes in the conf folder, even as root. This is true of any conf directory on the system. v-rebuild-dns-domains also fails to create the file/directory.

Code: Select all

/usr/local/vesta/func/ line 402: /home/user/conf/dns/ No such file or directory
/usr/local/vesta/func/ line 416: /home/user/conf/dns/ No such file or directory
chmod: cannot access '/home/user/conf/dns/': No such file or directory

Code: Select all

➜  conf sudo -i
root@hostname:~# cd /home/user/conf
root@hostname:/home/user/conf# mkdir dns
mkdir: cannot create directory ‘dns’: Operation not permitted
However, the system is correctly changing the named.conf file:

Code: Select all

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
zone "" {type master; file "/home/user/conf/dns/";};
Please advise.


Re: No user conf dns directory

Posted: Wed May 06, 2020 11:20 pm
by bryank
Ok, so it turns out that the conf directory has an immutable property on it.

Removing the property, creating the dns directory and then putting the property back fixes the issue.

Code: Select all

sudo -i
cd /home/<user>
chattr -i conf
cd conf
mkdir dns
cd ..
chattr +i conf
/usr/local/vesta/bin/v-rebuild-dns-domains <user>