I tried touching var/log/unbound.log under the unbound install
directory /home/unbound/var/log/unbound.log) and changing the logfile
parameter to the new path and then restarted unbound and still nothing
is being logged.
The permissions of the new log file are as follows:
- -rw-rw-r-- 1 unbound unbound
I'm not using chroot. I installed Unbound in the home directory of the
user "unbound". Could chroot be preventing unbound from logging anyway?
If you start unbound with '-d' from the commandline, it will log to
the console for a while. Maybe it will say why it cannot log. Then
you can ctrl-c unbound.
Or you can strace that unbound invocation and see what file it opens
and what happens.
Can you set the configuration option
chroot: ""
in unbound.conf? By default it sets chroot and that only allows file
accesses inside the chroot directory.
Chroot is very good for security but these path issues are
frustrating. You could locate the unbound.log file inside the chroot
path and specify its location by an absolute path and that should work
too and you then have chroot as well.
Best regards,
Wouter
Wouter,
Thank you for that idea! I did what you said and I see the
following message:
Could not open logfile /home/unbound/var/log/unbound.log: No such
file or directory
However, the file DOES exist (I touch'd it):
[unbound@ns2 ~]$ ls -l /home/unbound/var/log total 0 -rw-rw-r-- 1
unbound unbound 0 Feb 4 09:25 unbound.log
What's wrong?
Regards,
Sofía
Hi Sofia,
If you start unbound with '-d' from the commandline, it will log
to the console for a while. Maybe it will say why it cannot
log. Then you can ctrl-c unbound.
Or you can strace that unbound invocation and see what file it
opens and what happens.
Best regards, Wouter
Hi!
SELinux is disabled.
I tried touching var/log/unbound.log under the unbound install
directory /home/unbound/var/log/unbound.log) and changing the
logfile parameter to the new path and then restarted unbound
and still nothing is being logged.
The permissions of the new log file are as follows:
-rw-rw-r-- 1 unbound unbound
I'm not using chroot. I installed Unbound in the home
directory of the user "unbound". Could chroot be preventing
unbound from logging anyway?
Thank you a lot for your comments!
Kind regards,
Sofía
Hi Sofia,
que tal,
Sofía Silva Berenguer:
Hi!
I've installed Unbound on a Centos 6.5 server.
I've set it up not to use syslog and to log to the file
/var/log/unbound.log. Verbosity level is 5:
use-syslog: no logfile: /var/log/unbound.log verbosity:
5
Permissions for the log file are as follows:
-rw-r--r-- 1 unbound unbound
it might be a dir perms issue did you try changing to your
conf dir (ie. /usr/local/etc/unbound) ? drwxr-xr-x 4
unbound unbound 4096 Feb 4 12:14
chroot is another thing that could prevent logging. Or
SELinux.
Best regards, Wouter
However, the log file is empty. Unbound is not logging
anything to the file.
I set up chroot to /home/unbound and it's logging now
Thank you a lot for your help!
Regards,
Sofía
P.S.: I still have the issue with nsd can we go back to that?
Hi Sofia,
Can you set the configuration option chroot: "" in unbound.conf?
By default it sets chroot and that only allows file accesses inside
the chroot directory.
Chroot is very good for security but these path issues are
frustrating. You could locate the unbound.log file inside the
chroot path and specify its location by an absolute path and that
should work too and you then have chroot as well.
Best regards, Wouter
Wouter,
Thank you for that idea! I did what you said and I see the
following message:
Could not open logfile /home/unbound/var/log/unbound.log: No
such file or directory
However, the file DOES exist (I touch'd it):
[unbound@ns2 ~]$ ls -l /home/unbound/var/log total 0 -rw-rw-r--
1 unbound unbound 0 Feb 4 09:25 unbound.log
What's wrong?
Regards,
Sofía
Hi Sofia,
If you start unbound with '-d' from the commandline, it will
log to the console for a while. Maybe it will say why it
cannot log. Then you can ctrl-c unbound.
Or you can strace that unbound invocation and see what file it
opens and what happens.
Best regards, Wouter
Hi!
SELinux is disabled.
I tried touching var/log/unbound.log under the unbound
install directory /home/unbound/var/log/unbound.log) and
changing the logfile parameter to the new path and then
restarted unbound and still nothing is being logged.
The permissions of the new log file are as follows:
-rw-rw-r-- 1 unbound unbound
I'm not using chroot. I installed Unbound in the home
directory of the user "unbound". Could chroot be preventing
unbound from logging anyway?
Thank you a lot for your comments!
Kind regards,
Sofía
Hi Sofia,
que tal,
Sofía Silva Berenguer:
Hi!
I've installed Unbound on a Centos 6.5 server.
I've set it up not to use syslog and to log to the file
/var/log/unbound.log. Verbosity level is 5:
use-syslog: no logfile: /var/log/unbound.log
verbosity: 5
Permissions for the log file are as follows:
-rw-r--r-- 1 unbound unbound
it might be a dir perms issue did you try changing to
your conf dir (ie. /usr/local/etc/unbound) ? drwxr-xr-x
4 unbound unbound 4096 Feb 4 12:14
chroot is another thing that could prevent logging. Or
SELinux.
Best regards, Wouter
However, the log file is empty. Unbound is not logging
anything to the file.