Another "Error: Could not open command file" probl


#1

I’m having similiar problems as another user on this forum has listed. I have no errors being generated that I can find (apache.log, nagios.log, etc). I can log into Nagios and get to the home page but when I click on any of the links that invokes a CGI, it give the following error message: “Error: Could not open command file” . There are several threads on the web indicating permission issues with the nagios.log file. It would seem I would get errors in the log files if Nagios couldn’t access the files it needs to run properly. What am I missing?

  • Marty

#2

The permissions on my nagios.log file are the following:
drwxr-xr-x 2 nagios www-data 4096 2006-11-15 17:10 archives
-rwxrwxrwx 1 root root 3290 2008-03-06 14:43 nagios.log
-rwxrwxrwx 1 root root 0 2008-03-06 11:39 status.log

Is this a problem?


#3

In your cgi.cfg, check the following directives:

authorized_for_configuration_information
authorized_for_system_commands
authorized_for_all_services
authorized_for_all_hosts

If you followed the install/configuration documentation, you probably created an HTTP user called nagiosadmin. If so, the above directives need to be uncommented and nagiosadmin should be one of the values for said directives. You should read the documentation that precedes each directivge to make sure you want to enable it.

Hope this helps…