CGI permissions problem

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
GaWd
Posts: 51
Joined: Wed Dec 15, 2010 1:45 pm

CGI permissions problem

Post by GaWd »

I have a Nagios core installation-actually, I have 2, 1 is my prototype, and 1 is my working computer. The working computer is a clone of the prototype. Prior to making the clone, I was able to use the nagios system 100%-issuing web commands, re-checking, etc. Now I get the "Sorry, but you are not authorized to commit the specified command." error when I try to so anything. The system uses the htpasswd user file, has the same 'nagiosadmin' user and htpasswd in the file. File permissions are correct-nagios:nagcmd, and the apache user has permissions to all the required files. THis might have happened when I synced files from /usr/local/nagios/ on one machine to the other, but I can't think of anything that would have been different-outside of my manual changes-that would have caused trouble when copying files back and forth.

This seems to be the same problem as here:

http://support.nagios.com/forum/viewtop ... +to+commit

Anyhow, not sure what to do next. It looks like the correct user is logged in. Logging into a fresh browser yields the same results. I haven't yet disabled authentication to see if it works without authentication.
GaWd
Posts: 51
Joined: Wed Dec 15, 2010 1:45 pm

Re: CGI permissions problem

Post by GaWd »

I created a new user, and the new user-which has exact permissions to the first, and an htpasswd file set up exactly the same way-works fine.

Definitely sounds like the same problem as mentioned above and elsewhere on the web.
ajuhamza
Posts: 4
Joined: Thu Oct 11, 2012 12:32 am

Re: CGI permissions problem

Post by ajuhamza »

Can you check the permissions for the file
/usr/local/nagios/var/rw/nagios.cmd
It should be owned by Nagios and should have write permissions. Some thing like this:
[root@msmontest01 rw]# ls -l /usr/local/nagios/var/rw
total 0
prw-rw---- 1 nagios nagios 0 Oct 24 02:05 nagios.cmd
GaWd
Posts: 51
Joined: Wed Dec 15, 2010 1:45 pm

Re: CGI permissions problem

Post by GaWd »

The nagios.cmd file is properly owned by nagios:nagcmd (I configured using --with-nagcmd):

prw-rw---- 1 nagios nagcmd 0 Oct 25 07:24 nagios.cmd
GaWd
Posts: 51
Joined: Wed Dec 15, 2010 1:45 pm

Re: CGI permissions problem

Post by GaWd »

I decided to just forego further troubleshooting and integrated it with my AD system using LDAP. A very easy configuration change, and it makes management of it more centralized.
Locked