Symptoms
-
Plesk is installed on Debian 9:
# plesk version
Product version: Plesk Onyx 17.8.11 Update #14
Update date: 2018/07/21 05:16
Build date: 2018/07/03 10:11
OS version: Debian 9.5 -
BIND9 service unable to start with the following errors in the file
/var/log/syslog
:named[18893]: couldn't mkdir '//run': Permission denied
named[18893]: could not create //run/named/session.key
named[18893]: failed to generate session key for dynamic DNS: permission denied
Cause
Incorrect configuration of the service bind9
in the file /lib/systemd/system/bind9.service
.
Resolution
-
Connect to the server via using SSH.
-
Backup the original file:
# cp /lib/systemd/system/bind9.service /lib/systemd/system/bind9.service.backup
-
Download the default version of the file
/lib/systemd/system/bind9.service
and unpack it:# wget https://plesk.zendesk.com/hc/article_attachments/360032575953/bind9.tar.gz
# tar -xf bind9.tar.gz -
Move to the unpacked file to the required directory:
# mv -f bind9.service /lib/systemd/system/
-
Ensure that the the directory for the session key is exists:
# mkdir -p /var/named/run-root/run/named
# chown -R bind:bind /var/named/run-root/run -
Reload the systemd configuration and start BIND:
# systemctl daemon-reload
# systemctl start bind9