W dniu 31.08.2022 o 12:39, [email protected] pisze:
Hi,
What is the proper way to use a logfile in unbound(8)? I tried adding
the following lines in /var/unbound/etc/unbound.conf:
# $OpenBSD: unbound.conf,v 1.21 2020/10/28 11:35:58 sthen Exp $
server:
use-syslog: no
logfile: log/unbound.log
Then touched /var/unbound/log/unbound.log. However when starting unbound
with rcctl no logs were written in unbound.log. To investigate the issue
I started unbound in non-daemon mode and debug mode: unbound -d, there I
saw the following info:
unbound[33113:0] error: Could not open logfile log/unbound.log:
Permission denied
Does anyone know what might be the problem with this approach?
Thanks!
What have you checked already? I'd start with:
- what are the permissions on /var/unbound/log/unbound.log?
- as what user is unbound running?
- can that user access this file?
- does unbound use unveil(2), and if so, is it configured to be able
to access this file?
--
Łukasz Moskała