我在指定的数据文件中看到,由于权限错误,我创建的区域将无法加载:
[root@office1 tmp]# cat /var/named/data/named.run
info: managed-keys-zone: loaded serial 11
info: zone 0.in-addr.arpa/IN: loaded serial 0
info: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
info: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
info: zone localhost.localdomain/IN: loaded serial 0
info: zone localhost/IN: loaded serial 0
notice: all zones loaded
notice: running
info: received control channel command 'stop'
info: shutting down: flushing changes
notice: stopping command channel on 127.0.0.1#953
notice: stopping command channel on ::1#953
info: no longer listening on 127.0.0.1#53
info: no longer listening on 10.73.111.72#53
info: no longer listening on 192.168.122.1#53
notice: exiting
info: managed-keys-zone: journal file is out of date: removing journal file
info: managed-keys-zone: loaded serial 12
info: zone 0.in-addr.arpa/IN: loaded serial 0
info: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
info: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
info: zone localhost.localdomain/IN: loaded serial 0
info: zone localhost/IN: loaded serial 0
error: zone example.vm/IN: loading from master file db.example failed: permission denied
error: zone example.vm/IN: not loaded due to errors.
notice: all zones loaded
notice: running
info: received control channel command 'stop'
info: shutting down: flushing changes
notice: stopping command channel on 127.0.0.1#953
notice: stopping command channel on ::1#953
info: no longer listening on 127.0.0.1#53
info: no longer listening on 10.73.111.72#53
info: no longer listening on 192.168.122.1#53
notice: exiting
info: managed-keys-zone: journal file is out of date: removing journal file
info: managed-keys-zone: loaded serial 13
info: zone 0.in-addr.arpa/IN: loaded serial 0
info: zone localhost.localdomain/IN: loaded serial 0
info: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
info: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
info: zone localhost/IN: loaded serial 0
error: zone example.vm/IN: loading from master file db.example failed: **permission denied**
error: zone example.vm/IN: not loaded due to errors.
notice: all zones loaded
notice: running
我对区域文件 db.example 的组权限设置为与组相同:
[root@office1 named]# ls -l
total 24
drwxrwx---. 2 named named 49 Nov 25 03:48 data
-rw-r-----. 1 root root 246 Nov 28 14:08 db.example
-rw-r-----. 1 root named 234 Nov 28 08:20 db.office1
drwxrwx---. 2 named named 31 Nov 29 10:37 dynamic
-rw-r-----. 1 root named 2281 May 22 2017 named.ca
-rw-r-----. 1 root named 152 Dec 15 2009 named.empty
-rw-r-----. 1 root named 152 Jun 21 2007 named.localhost
-rw-r-----. 1 root named 168 Dec 15 2009 named.loopback
drwxrwx---. 2 named named 6 Aug 27 08:40 slaves
有任何想法吗?
答案1
您的发行版可能bind
以 usernamed
和 group身份运行named
,否则目录/var/lib/named
不会由该用户和组的所有者拥有。
您的db.example
所有者为root:root
640,并且模式为 640,因此权限被拒绝。