You are not logged in.

#1 2020-08-07 22:06:19

boyd8444
Member
Registered: 2020-02-01
Posts: 10

DNS unbound server logging / chroot problem

I've tried everything to get unbound to write to a log file outside /etc/unbound
I have configured unbound to log to /var/log/unbound, but it isn't working:

# /etc/unbound/unbound.conf

    chroot: ""
    verbosity: 2
    logfile: /var/log/unbound/unbound.log
    use-syslog: no

ownership and permissions seem correct for both the log file and the log file directory:

ls -lha /var/log/unbound/
drwxrwxrwx 2 unbound unbound 4.0K Jul 14 16:28 .
-rwxrwxrwx 1 unbound unbound 1.2K Aug  7 16:47 unbound.log

however, unbound won't write to the log file because of a chroot problem:

error: Could not open logfile /var/log/unbound/unbound.log: Read-only file system

Last edited by boyd8444 (2020-08-07 22:20:45)

Offline

#2 2020-08-07 22:08:51

boyd8444
Member
Registered: 2020-02-01
Posts: 10

Re: DNS unbound server logging / chroot problem

After increasing debugging level to 3 and toggling use-syslog from yes to no, it still won't write to the log file

Aug 07 17:19:06 newton unbound[3506]: [1596838746] unbound[3506:0] debug: chdir to /etc/unbound
Aug 07 17:19:06 newton unbound[3506]: [1596838746] unbound[3506:0] debug: drop user privileges, run as unbound
Aug 07 17:19:06 newton unbound[3506]: [1596838746] unbound[3506:0] debug: switching log to /var/log/unbound/unbound.log
Aug 07 17:19:06 newton unbound[3506]: [1596838746] unbound[3506:0] error: Could not open logfile /var/log/unbound/unbound.log: Read-only file system

Last edited by boyd8444 (2020-08-07 22:26:05)

Offline

Board footer

Powered by FluxBB