实例场景不能成功
文件/etc/named.conf配置:
options{ directory "/var/named"; }; zone "imooc.com"{ type master; file "imooc.com.zone"; };
文件/var/named/imooc.com.zone配置:
$TTL 7200 imooc.com. IN SOA imooc.com. ho.imooc.com. (222 1H 15M 1W 1D) imooc.com. IN NS dns1.imooc.com. dns1.imooc.com. IN A 192.168.199.202 www.imooc.com. IN A 2.2.2.2
重启named服务就报错
报错信息:
Aug 29 14:37:39 localhost named[3625]: corporation. Support and training for BIND 9 are
Aug 29 14:37:39 localhost named[3625]: available at https://www.isc.org/support
Aug 29 14:37:39 localhost named[3625]: ----------------------------------------------------
Aug 29 14:37:39 localhost named[3625]: adjusted limit on open files from 4096 to 1048576
Aug 29 14:37:39 localhost named[3625]: found 1 CPU, using 1 worker thread
Aug 29 14:37:39 localhost named[3625]: using up to 4096 sockets
Aug 29 14:37:39 localhost named[3625]: loading configuration from '/etc/named.conf'
Aug 29 14:37:39 localhost named[3625]: none:0: open: /etc/named.conf: permission denied
Aug 29 14:37:39 localhost named[3625]: loading configuration: permission denied
Aug 29 14:37:39 localhost named[3625]: exiting (due to fatal error)
问题出在哪?怎么解决啊?