Page 1 of 1

CGI permissions problem

Posted: Sun Oct 21, 2012 11:55 am
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.

Re: CGI permissions problem

Posted: Sun Oct 21, 2012 2:56 pm
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.

Re: CGI permissions problem

Posted: Thu Oct 25, 2012 4:03 am
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

Re: CGI permissions problem

Posted: Thu Oct 25, 2012 9:41 am
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

Re: CGI permissions problem

Posted: Thu Oct 25, 2012 4:39 pm
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.