源码安装的bind9.9启动后提示没有权限的解决方法

发布时间:2019-10-01编辑:脚本学堂
源码安装的bind9.9启动后提示没有权限的解决方法

源码安装的BIND 9.9.0,启动后提示没有权限:
Mar 27 00:25:34 ns2-shpbs named[23623]: starting BIND 9.9.0 -c /usr/local/named/etc/named.conf -u bind
Mar 27 00:25:34 ns2-shpbs named[23623]: built with '--prefix=/usr/local/named' '--enable-threads' '--enable-largefile' '--disable-ipv6'
Mar 27 00:25:34 ns2-shpbs named[23623]: ----------------------------------------------------
Mar 27 00:25:34 ns2-shpbs named[23623]: BIND 9 is maintained by Internet Systems Consortium,
Mar 27 00:25:34 ns2-shpbs named[23623]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
Mar 27 00:25:34 ns2-shpbs named[23623]: corporation.  Support and training for BIND 9 are
Mar 27 00:25:34 ns2-shpbs named[23623]: available at https://www.isc.org/support
Mar 27 00:25:34 ns2-shpbs named[23623]: ----------------------------------------------------
Mar 27 00:25:34 ns2-shpbs named[23623]: adjusted limit on open files from 1024 to 1048576
Mar 27 00:25:34 ns2-shpbs named[23623]: found 24 CPUs, using 24 worker threads
Mar 27 00:25:34 ns2-shpbs named[23623]: using 24 UDP listeners per interface
Mar 27 00:25:34 ns2-shpbs named[23623]: using up to 4096 sockets
Mar 27 00:25:34 ns2-shpbs named[23623]: loading configuration from '/usr/local/named/etc/named.conf'
Mar 27 00:25:34 ns2-shpbs named[23623]: reading built-in trusted keys from file '/usr/local/named/etc/bind.keys'
Mar 27 00:25:34 ns2-shpbs named[23623]: using default UDP/IPv4 port range: [1024, 65535]
Mar 27 00:25:34 ns2-shpbs named[23623]: using default UDP/IPv6 port range: [1024, 65535]
Mar 27 00:25:34 ns2-shpbs named[23623]: listening on IPv4 interface lo, 127.0.0.1#53
Mar 27 00:25:34 ns2-shpbs named[23623]: listening on IPv4 interface eth0, 101.44.1.168#53
Mar 27 00:25:34 ns2-shpbs named[23623]: generating session key for dynamic DNS
Mar 27 00:25:34 ns2-shpbs named[23623]: Could not open '/usr/local/named/var/run/named/session.key'.
Mar 27 00:25:34 ns2-shpbs named[23623]: Please check file and directory permissions or reconfigure the filename.
Mar 27 00:25:34 ns2-shpbs named[23623]: could not open file '/usr/local/named/var/run/named/session.key': Permission denied
Mar 27 00:25:34 ns2-shpbs named[23623]: could not create /usr/local/named/var/run/named/session.key
Mar 27 00:25:34 ns2-shpbs named[23623]: failed to generate session key for dynamic DNS: permission denied
Mar 27 00:25:34 ns2-shpbs named[23623]: sizing zone task pool based on 5 zones
Mar 27 00:25:34 ns2-shpbs named[23623]: set up managed keys zone for view _default, file 'managed-keys.bind'
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 10.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 16.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 17.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 18.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 19.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 20.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 21.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 22.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 23.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 24.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 25.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 26.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 27.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 28.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 29.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 30.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 31.172.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 168.192.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 0.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 127.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 254.169.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 100.51.198.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 113.0.203.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 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.0.IP6.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty 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
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: D.F.IP6.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 8.E.F.IP6.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 9.E.F.IP6.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: A.E.F.IP6.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: B.E.F.IP6.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
Mar 27 00:25:34 ns2-shpbs named[23623]: command channel listening on 127.0.0.1#953
Mar 27 00:25:34 ns2-shpbs named[23623]: managed-keys-zone: loaded serial 0
Mar 27 00:25:34 ns2-shpbs named[23623]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
Mar 27 00:25:34 ns2-shpbs named[23623]: zone localhost/IN: loaded serial 42
Mar 27 00:25:34 ns2-shpbs named[23623]: zone 1.168.192.in-addr.arpa/IN: loaded serial 20031001
Mar 27 00:25:34 ns2-shpbs named[23623]: zone test.com/IN: loaded serial 2008050122
Mar 27 00:25:34 ns2-shpbs named[23623]: all zones loaded
Mar 27 00:25:34 ns2-shpbs named[23623]: running

解决方法:
#chown -R bind:bind var/run