Mnemosyne
Mnemosyne

Reputation: 1192

my unbound instance doesn't write on the logfile

I installed unbound 1.13.1 and I want to use it as a recursive resolver and log everything into a file. Unfortunately, unbound does not write into the file and I get the error:

Feb 15 11:46:53 unbound[832702:0] error: Could not open logfile /etc/unbound/unbound.log: Permission denied

The file's ownership has already been assigned to user unbound and the service has been restarted:

0 -rw-r--r--  1 unbound unbound    0 Feb 15 10:17 unbound.log

I also tried to create this file in multiple other directories like my home directory, under /var/sys/log/ etc. but the exact same error persists.

And this is what the config file looks like:

include-toplevel: "/etc/unbound/unbound.conf.d/*.conf"

server:

    use-syslog: no
    chroot: ""
    username: "unbound"
    directory: "/etc/unbound/"
    logfile: "/etc/unbound/unbound.log"
    verbosity: 5
    log-queries: yes
    log-replies: yes
    log-tag-queryreply: yes
    log-servfail: yes
    log-time-ascii: yes
    do-ip6: yes
    interface: 127.0.0.53
    port: 53
    prefetch: no
    root-hints: /usr/share/dns/root.hints
    harden-dnssec-stripped: yes

Does anyone see what I am doing wrong regarding the log file?

Upvotes: 0

Views: 337

Answers (0)

Related Questions