Cannot write /certs when saving a certificate

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Dan_F_DXC
Posts: 18
Joined: Tue Apr 14, 2020 3:18 pm

Re: Cannot write /certs when saving a certificate

Post by Dan_F_DXC »

Okay I bumped it did a capture and included the logs.

Same thing.
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Cannot write /certs when saving a certificate

Post by cdienger »

Edit the AD definition in NLS - it currently uses @oobmgmt.mgmt.sabre.com in the Base DN field. This field should be formatted to look something like:

Code: Select all

cn=users,dc=sabre,dc=local
The above is an example. Confirm with the AD config the location of the users in the LDAP setup.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Dan_F_DXC
Posts: 18
Joined: Tue Apr 14, 2020 3:18 pm

Re: Cannot write /certs when saving a certificate

Post by Dan_F_DXC »

So I looked at what we had in base dn on our nagios xi servers and corrected nls to match. I have attached the screen shot of that config. However looked at the logs I got something new. The last line of the error log may help us:

[Mon Jul 27 13:23:44.647850 2020] [autoindex:error] [pid 119261] [client 10.198.5.105:53149] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Cannot write /certs when saving a certificate

Post by ssax »

The permissions of the directories need to be adjusted:

Code: Select all

chmod 0775 /etc/openldap/certs
chmod 0775 /etc/openldap/cacerts
That should fix the directory being writable issue.

Enable debugging if you haven't:

https://support.nagios.com/kb/article/a ... n-600.html

Run this command as root (and leave it running):

Code: Select all

tail -Fn0 /var/log/httpd/error_log /var/log/httpd/ssl_error_log
Then try it again and send us the full output of the tail command.

Thank you!
Dan_F_DXC
Posts: 18
Joined: Tue Apr 14, 2020 3:18 pm

Re: Cannot write /certs when saving a certificate

Post by Dan_F_DXC »

well I think we got the permissions right early on. I did however enable that enhanced debugging option you mentioned and I get the same result. Nothing in the error log but this is what shows up in the access_log.

root@hpsatvld5352:/var/log/httpd # tail -Fn0 access_log error_log
==> access_log <==

==> error_log <==

==> access_log <==
10.198.5.105 - - [28/Jul/2020:14:27:46 -0500] "POST /nagioslogserver/admin/users/import HTTP/1.1" 500 - "http://hpsatvld5352.mgmt.sabre.com/nagi ... ers/import" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0"
10.198.5.105 - - [28/Jul/2020:14:27:47 -0500] "GET /favicon.ico HTTP/1.1" 404 209 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0"

I still get a blank page in my web browser.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Cannot write /certs when saving a certificate

Post by ssax »

Do you have this file? If so, what does it contain?

Code: Select all

/var/log/httpd/ssl_error_log
Dan_F_DXC
Posts: 18
Joined: Tue Apr 14, 2020 3:18 pm

Re: Cannot write /certs when saving a certificate

Post by Dan_F_DXC »

That error log doesn't exist:

root@hpsatvld5352:/var/log/httpd # ls
access_log access_log-20200726 error_log error_log-20200726
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Cannot write /certs when saving a certificate

Post by ssax »

Please create a ticket for this and include a link back to this forum thread so we can get a remote session setup:

https://support.nagios.com/tickets/

Thank you!
Locked