Could not write domain's db file in /var/named

Access_Denied

Verified User
Joined
Sep 7, 2021
Messages
13
Hello.
The first setup of our Directadmin instance was done in 2019. At that time, according to the material https://help.directadmin.com/item.php?id=196, I added a third NS to /usr/local/directadmin/data/templates/custom/dns_ns.conf.
i.e., cat /usr/local/directadmin/data/templates/custom/dns_ns.conf
|NS1|=|DOMAIN|.
|NS2|=|DOMAIN|.
MyNS.com.=|DOMAIN|.

In resellers settings (reseller/nameservers) setup two NS: Name Server 1 and Name Server 2 (Ex., ns1.MyNS.com and ns2.MyNS.com).

Since June 2022, when restoring a backup archive from Cpanel to Directadmin, we get errors (For all the years before there was no errors):
<b>Could not write domain's db file in /var/named</b> <b>Unable to save DNS zone: named-checkzone returned: loading "userdomain.com" from "/var/named/userdomain.com.db.temp.3250386.sNCjKE4B7i" class "IN" dns_rdata_fromtext: /var/named/userdomain.com.db.temp.3250386.sNCjKE4B7i:15: near 'ns1.MyNS.com..': empty label dns_rdata_fromtext: /var/named/userdomain.com.db.temp.3250386.sNCjKE4B7i:22: near 'ns1.MyNS.com..': empty label dns_rdata_fromtext: /var/named/userdomain.com.db.temp.3250386.sNCjKE4B7i:23: near 'ns2.MyNS.com..': empty label zone userdomain.com/IN: loading from master file /var/named/userdomain.com.db.temp.3250386.sNCjKE4B7i failed: empty label zone userdomain.com/IN: not loaded due to errors.

When restoring a backup archive from Directadmin to Directadmin there are NO errors.

If the file /usr/local/directadmin/data/templates/custom/dns_ns.conf is changed to this:
|NS1|=|DOMAIN|
|NS2|=|DOMAIN|
MyNS.com.=|DOMAIN|.
then
there is no error, ns zone is created correctly when restoring from backup and there is no double dots.
But after that, any other domain is created incorrectly (without a dot in the zone NS file), although this does not cause errors immediately.
What to do with this?
(file ns zone in Cpanel backup are correct).
 
Back
Top