Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging to file doesn't work. Permission error. #193

Open
T3rm1 opened this issue Oct 26, 2024 · 1 comment
Open

Logging to file doesn't work. Permission error. #193

T3rm1 opened this issue Oct 26, 2024 · 1 comment

Comments

@T3rm1
Copy link

T3rm1 commented Oct 26, 2024

Used image for 1.22.0.

config:

verbosity: 5
log-queries: yes
log-replies: yes
logfile: /opt/unbound/etc/unbound/unbound.log

container logs:

[1729978862] unbound[1:0] debug: chdir to /opt/unbound/etc/unbound
[1729978862] unbound[1:0] debug: chroot to /opt/unbound/etc/unbound
[1729978862] unbound[1:0] debug: drop user privileges, run as _unbound
[1729978862] unbound[1:0] debug: switching log to /opt/unbound/etc/unbound/unbound.log
[1729978862] unbound[1:0] error: Could not open logfile /unbound.log: Permission denied

I think the problem is that /opt/unbound/etc/unbound belongs to root and the user _unbound has no write permission.

@foegra
Copy link

foegra commented Oct 28, 2024

Same here.
If i bash into the container itself and and create log file and the do chmod 666 to log file - logging to file works, but then those logs are not shown in docker itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants