loading configuration: permission denied
尝试启动 bind9 服务时出现致命错误。
root@dns:~# sudo service bind9 stop
root@dns:~# sudo service bind9 start
root@dns:~# sudo service bind9 status
● bind9.service - BIND Domain Name Server
Loaded: loaded (/etc/systemd/system/bind9.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-08-17 23:58:55 UTC; 2s ago
Docs: man:named(8)
Process: 973 ExecStop=/usr/sbin/rndc stop (code=exited, status=0/SUCCESS)
Process: 1005 ExecStart=/usr/sbin/named -f $OPTIONS (code=exited, status=1/FAILURE)
Main PID: 1005 (code=exited, status=1/FAILURE)
Aug 17 23:58:55 dns.gho.st named[1005]: adjusted limit on open files from 4096 to 1048576
Aug 17 23:58:55 dns.gho.st named[1005]: found 1 CPU, using 1 worker thread
Aug 17 23:58:55 dns.gho.st named[1005]: using 1 UDP listener per interface
Aug 17 23:58:55 dns.gho.st named[1005]: using up to 4096 sockets
Aug 17 23:58:55 dns.gho.st named[1005]: loading configuration from '/etc/bind/named.conf'
Aug 17 23:58:55 dns.gho.st named[1005]: /etc/bind/named.conf.local:9: open: /var/freeday/sink_local.conf: permission denied
Aug 17 23:58:55 dns.gho.st named[1005]: loading configuration: permission denied
Aug 17 23:58:55 dns.gho.st named[1005]: exiting (due to fatal error)
Aug 17 23:58:55 dns.gho.st systemd[1]: bind9.service: Main process exited, code=exited, status=1/FAILURE
Aug 17 23:58:55 dns.gho.st systemd[1]: bind9.service: Failed with result 'exit-code'.
但是权限sink_local.conf
与named.conf.local
root@dns:~# ls -alh /etc/bind/ | grep named.conf.local
-rw-r--r-- 1 root bind 205 Aug 17 23:57 named.conf.local
root@dns:~# ls -alh /var/freeday/ | grep sink_local.conf
-rw-r--r-- 1 root root 1020 Aug 17 22:56 sink_local.conf
root@dns:~# ls -alh /var | grep freeday
drwxr-xr-x 3 root bind 4.0K Aug 17 22:56 freeday
我正在 Linode 上的新 18.04LTS Ubuntu 映像上运行它。
以前有人遇到过这个问题吗?我下一步该如何解决?