FreeBSD

Bind unable to rename log file ‘/var/log/query.log’ to ‘/var/log/query.log.0’: permission denied

После установки FreeBSD10 и настройки DNS сервера BIND 9.9.4-P2, у меня в /var/log/messages появились такие строки:

unable to rename log file '/var/log/query.log' to '/var/log/query.log.0': permission denied

Логи по умолчанию складываются в /var/log

Feb  1 11:33:17 alexnettm named[55903]: built with '--localstatedir=/var' '--disable-linux-caps' '--disable-symtable' '--with-randomdev=/dev/random' '--without-python' '--disable-filter-aaaa' '--disable-fixed-rrset' '--with-gssapi' '--without-idn' '--enable-ipv6' '--disable-largefile' '--disable-rpz-nsdname' '--disable-rpz-nsip' '--disable-rrl' '--with-openssl=/usr' '--with-libxml2=/usr/local' '--enable-threads' '--sysconfdir=/usr/local/etc/namedb' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=x86_64-portbld-freebsd10.0' 'build_alias=x86_64-portbld-freebsd10.0' 'CC=cc' 'CFLAGS=-O2 -pipe -fno-strict-aliasing' 'LDFLAGS= -L/usr/lib -lgssapi_krb5 -Wl,-rpath=/usr/lib:/usr/local/lib' 'CPPFLAGS=' 'CPP=cpp'
Feb  1 11:33:17 alexnettm named[55903]: ----------------------------------------------------
Feb  1 11:33:17 alexnettm named[55903]: BIND 9 is maintained by Internet Systems Consortium,
Feb  1 11:33:17 alexnettm named[55903]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
Feb  1 11:33:17 alexnettm named[55903]: corporation.  Support and training for BIND 9 are
Feb  1 11:33:17 alexnettm named[55903]: available at https://www.isc.org/support
Feb  1 11:33:17 alexnettm named[55903]: ----------------------------------------------------
Feb  1 11:33:17 alexnettm named[55903]: command channel listening on 127.0.0.1#953
Feb  1 11:33:18 alexnettm named[55903]: unable to rename log file '/var/log/query.log' to '/var/log/query.log.0': permission denied

Проблема решилась так:

В конфиге /usr/local/etc/namedb/named.conf изменить /var/log/* на /var/log/named/*

# mkdir /var/log/named
# chown -R bind:bind /var/log/named/
# service named restart

После все логи складываются в папку /var/log/named/* и ошибок больше нет.

Оставить комментарий

1 комментарий