Hide Forgot
If the access log cannot be opened there is an error reported in errors log. But it doesn;t give any reason why the access log file couldn't be opened. The errno should be returned at least.
Upstream ticket: https://fedorahosted.org/389/ticket/21
I set a bogus access log path in cn=config: nsslapd-accesslog: /var/log/dirsrv/slapd-bogus/access Staring the server failed and this error/warning was logged in the error log: [..] - WARNING: can't open file /var/log/dirsrv/slapd-bogus/access. errno 2 (No such file or directory) I double checked the log.c code and verified all the opening access codes (LOG_OPEN_APPEND) are followed by the error report with errno and its strerror like this: LDAPDebug(LDAP_DEBUG_ANY, "access file open %s failed errno %d (%s)\n", loginfo.log_access_file, oserr, slapd_system_strerror(oserr)); Could it be possible to share the error log with us?
The error log is gone with the server where I reproduced. However testing with a bogus file name is the wrong test. You have to test with an existing file you cannot open (SELinux was blocking access at the time due to wrong labeling IIRC).
Thank you, Simo. I still see the errno and error message. # setenforce 1 # getenforce Enforcing # service dirsrv start # tail errors [..] - WARNING: can't open file /var/tmp/slapd-kiki1/access. errno 13 (Permission denied) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [..] dse - The entry cn=config in file /etc/dirsrv/slapd-kiki/dse.ldif is invalid, error code 53 (Server is unwilling to perform) - Cannot open accesslog directory "/var/tmp/slapd-kiki1/access", client accesses will not be logged. [..] dse - Could not load config file [dse.ldif] [..] dse - Please edit the file to correct the reported problems and then restart the server. If I disable selinux, the server starts just fine with no warnings/errors. So, this Permission denied error is coming from selinux...
I can only guess it has been fixed since I reported the error.
(In reply to comment #7) > I can only guess it has been fixed since I reported the error. Probably, you are right. If you are okay with the output I pasted in Comment 6, I'm closing this bug with WORKSFORME. Please reopen it if you have any problems. Thanks, Simo!