Score:0

Change the BIND query log file destination

in flag

I am trying to change the file that my BIND server stores query logs from the messages file in /var/log/messages to /var/log/named/named.log. When I restart the BIND service, for the changes to take effect, it fails to start because the service doesn't have permission to access the new log file. How can I give BIND permission to access the new log file? Here is the output from the error. I am running this server on Debian.

-- 
-- A start job for unit bind9.service has finished with a failure.
-- 
-- The job identifier is 3717 and the job result is failed.
Jun 27 17:12:11 bcc-21 named[3188]: configuring command channel from '/etc/bind/rndc.key'
Jun 27 17:12:11 bcc-21 named[3188]: command channel listening on 127.0.0.1#953
Jun 27 17:12:11 bcc-21 named[3188]: configuring command channel from '/etc/bind/rndc.key'
Jun 27 17:12:11 bcc-21 named[3188]: command channel listening on ::1#953
Jun 27 17:12:11 bcc-21 named[3188]: isc_stdio_open '/var/log/named/named.log' failed: permission denied
Jun 27 17:12:11 bcc-21 named[3188]: configuring logging: permission denied
Jun 27 17:12:11 bcc-21 named[3188]: loading configuration: permission denied
Jun 27 17:12:11 bcc-21 named[3188]: exiting (due to fatal error)
Score:0
in flag

You need to create /var/log/named and then give it the right permissions for bind to create files in it. Typically you'll want to run (as root):

mkdir /var/log/named
chown named /var/log/named

where the named user is the user that bind is actually running as. That's a common name across most linux distributions, but it could be different.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.