isc_stdio_open '/var/log/bind9/query.log' failed: permission denied
Solution 1
On /etc/apparmor.d/usr.sbin.named
/var/log/named/** rw,
/var/log/named/ rw,
You must adjust permissions or dir here.
Some people like to put logs in /var/log/named/
instead of having syslog
do the heavy lifting.
Solution 2
I tried to configure custom logging, "/var/log/named/log.files.names".
I tried everything that seamed reasonable to get rid of the error, "isc_file_isplainfile '/var/log/named/default' failed: permission denied" by changing the file system permissions without success. I then tried to make the named log files and directory executable and couldn't believe it, that fixed the permissions. Apparently bind needs to execute something using these files and/or directory.
owner=root:group=named and permissions are 775.
p.s: Zanna, you should take your own advice about editing other people's posts. Unless you absolutely know what they're trying to say and not thinking you know, even the most minuscule change you make in their grammar can profoundly change the meaning of their post.
Related videos on Youtube
Comments
-
Mahesh over 1 year
/etc/apparmor.d/usr.sbin.named /var/log/bind9/** rw, /var/log/bind9/ rw, /etc/bind/named.conf.options options { directory "/var/cache/bind"; auth-nxdomain no; listen-on-v6 { any; }; statistics-file "/var/cache/bind/named.stats"; rrset-order {order cyclic;}; allow-transfer { 127.0.0.1; }; }; logging { channel b_query { file "/var/log/bind9/query.log" versions 2 size 1m; print-time yes; severity info; }; category queries { b_query; }; };
service bind9 status
isc_stdio_open '/var/log/bind9/query.log' failed: permission denied
I have already created bind9 in
/var/log
and addedroot:bind
with permission755
I have already restarted apparmor and bind9 Same error. What is wrong ?
-
fosslinux almost 6 yearsIf you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review
-
David Foerster almost 6 years@ubashu: This looks like an answer to me albeit with a rather unnecessary introduction.
-
Till Kolditz about 4 yearsThanks! This saved my day after upgrading ubuntu on my raspberrypi 2b+ from 18.04.4 xeinal to 20.04 focal