bind9 重启失败-提示权限错误

bind9 重启失败-提示权限错误

我是新来的,如果能从你那里得到一些关于我的问题的线索,我会很高兴,

我已经在 Ubuntu 中安装了 bind9,安装成功,并且能够看到 bind9 正在运行,

然后根据我的需要进行了配置,现在无法重新启动绑定。

请检查我收到的系统日志,它说存在一些文件权限问题,

Jul 16 20:22:56 telxsi-desktop named[19659]: starting BIND 9.8.1-P1 -u bind

Jul 16 20:22:56 telxsi-desktop named[19659]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--
infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'

Jul 16 20:22:56 telxsi-desktop named[19659]: adjusted limit on open files from 4096 to 1048576

Jul 16 20:22:56 telxsi-desktop named[19659]: found 2 CPUs, using 2 worker threads

Jul 16 20:22:56 telxsi-desktop named[19659]: using up to 4096 sockets

Jul 16 20:22:56 telxsi-desktop named[19659]: loading configuration from '/etc/bind/named.conf'

Jul 16 20:22:56 telxsi-desktop named[19659]: reading built-in trusted keys from 
file '/etc/bind/bind.keys'

Jul 16 20:22:56 telxsi-desktop named[19659]: using default UDP/IPv4 port range: [1024, 65535]

Jul 16 20:22:56 telxsi-desktop named[19659]: using default UDP/IPv6 port range: [1024, 65535]

Jul 16 20:22:56 telxsi-desktop named[19659]: listening on IPv6 interfaces, port 53

Jul 16 20:22:56 telxsi-desktop named[19659]: listening on IPv4 interface lo, 127.0.0.1#53

Jul 16 20:22:56 telxsi-desktop named[19659]: binding TCP socket: address in use

Jul 16 20:22:56 telxsi-desktop named[19659]: listening on IPv4 interface eth1, 192.168.27.68#53

Jul 16 20:22:56 telxsi-desktop named[19659]: generating session key for dynamic DNS

Jul 16 20:22:56 telxsi-desktop named[19659]: sizing zone task pool based on 7 zones

Jul 16 20:22:56 telxsi-desktop named[19659]: using built-in root key for view _default

Jul 16 20:22:56 telxsi-desktop named[19659]: set up managed keys zone for view _default, 
file 'managed-keys.bind'

Jul 16 20:22:56 telxsi-desktop named[19659]: Warning: 'empty-zones-enable/disable-empty-zone' not 
set: disabling RFC 1918 empty zones

Jul 16 20:22:56 telxsi-desktop named[19659]: automatic empty zone: 254.169.IN-ADDR.ARPA

Jul 16 20:22:56 telxsi-desktop named[19659]: automatic empty zone: 2.0.192.IN-ADDR.ARPA

Jul 16 20:22:56 telxsi-desktop named[19659]: automatic empty zone: 100.51.198.IN-ADDR.ARPA

Jul 16 20:22:56 telxsi-desktop named[19659]: automatic empty zone: 113.0.203.IN-ADDR.ARPA

Jul 16 20:22:56 telxsi-desktop named[19659]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA

Jul 16 20:22:56 telxsi-desktop named[19659]: 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

Jul 16 20:22:56 telxsi-desktop named[19659]: 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

Jul 16 20:22:56 telxsi-desktop named[19659]: automatic empty zone: D.F.IP6.ARPA

Jul 16 20:22:56 telxsi-desktop named[19659]: automatic empty zone: 8.E.F.IP6.ARPA

Jul 16 20:22:56 telxsi-desktop named[19659]: automatic empty zone: 9.E.F.IP6.ARPA

Jul 16 20:22:56 telxsi-desktop named[19659]: automatic empty zone: A.E.F.IP6.ARPA

Jul 16 20:22:56 telxsi-desktop named[19659]: automatic empty zone: B.E.F.IP6.ARPA

Jul 16 20:22:56 telxsi-desktop named[19659]: automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA

Jul 16 20:22:56 telxsi-desktop named[19659]: command channel listening on 127.0.0.1#953



Jul 16 20:22:56 telxsi-desktop named[19659]: command channel listening on ::1#953



Jul 16 20:22:56 telxsi-desktop named[19659]: isc_stdio_open '/var/log/syslog' failed: permission denied

Jul 16 20:22:56 telxsi-desktop named[19659]: configuring logging: permission denied

Jul 16 20:22:56 telxsi-desktop named[19659]: loading configuration: permission denied

Jul 16 20:22:56 telxsi-desktop named[19659]: exiting (due to fatal error)

telxsi@telxsi-desktop:~$

telxsi@telxsi-desktop:~$

请注意最后的这些错误条目:

Jul 16 20:22:56 telxsi-desktop named[19659]: isc_stdio_open '/var/log/syslog' failed: permission denied

Jul 16 20:22:56 telxsi-desktop named[19659]: configuring logging: permission denied

Jul 16 20:22:56 telxsi-desktop named[19659]: loading configuration: permission denied

Jul 16 20:22:56 telxsi-desktop named[19659]: exiting (due to fatal error)

答案1

您配置了类似以下内容的内容:

logging {
    channel default_file {
        file "/var/log/syslog" ...
    };
    category default { default_file; };
}

然而你永远不应该直接写入 /var/log/syslog。此文件属于 syslog,你只能通过 syslog 向其记录日志。

如果您希望您的消息最终出现在 /var/log/syslog 中,则将其转换为以下内容:

channel default_syslog {
    syslog daemon;        # send to syslog's daemon facility
    severity info;        # only send priority info and higher
};
category default { default_syslog; };

相关内容