External Commands not working

Marc Powell marc at ena.com
Wed Apr 27 19:12:41 CEST 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of John McGowan
> Sent: Wednesday, April 27, 2005 11:57 AM
> To: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] External Commands not working
> 

[snip]

> Well, I thought It might be SELinux, but alas I disabled it when i
> installed FC3.   :)
> 
> [root at gob log]# cat /etc/selinux/config
> SELINUX=disabled
> 
> Which makes sense, because external commands are the ONLY thing I'm
having
> a problem with.  All the other CGI stuff seems to be working fine, and
I
> didn't see anything in /var/log/messages....
> 
> darnit...
> 
> okay here is my documentation....
> 
> [root at gob rw]# pwd
> /usr/local/nagios/var/rw
> [root at gob rw]# ls -al
> total 8
> drwxrwsr-x  2 nagios nagiocmd 4096 Apr 27 11:04 .
> drwxrwxr-x  4 nagios nagios   4096 Apr 27 11:49 ..
> prw-rw----  1 nagios nagiocmd    0 Apr 27 11:04 nagios.cmd

Looks good. How about permissions on /usr/local/nagios/var? Is it at
least 755? Everything above that should be fine as you've indicated your
CGI's work so Apache has access to /usr/local/nagios at the least.
 
> [root at gob rw]# cat /etc/group | grep nagios
> nagios:x:502:
> nagiocmd:x:503:nagios,nobody

Yep. Good here as well.

 
> [root at gob rw]# ps -ef | grep httpd
> root     20389     1  0 Apr22 ?        00:00:00
> /usr/local/apache2/bin/httpd -k start
> nobody    9430 20389  0 11:07 ?        00:00:00
> /usr/local/apache2/bin/httpd -k start
> nobody    9431 20389  0 11:07 ?        00:00:00
> /usr/local/apache2/bin/httpd -k start
> nobody    9432 20389  0 11:07 ?        00:00:00
> /usr/local/apache2/bin/httpd -k start
> nobody    9433 20389  0 11:07 ?        00:00:00
> /usr/local/apache2/bin/httpd -k start
> nobody    9434 20389  0 11:07 ?        00:00:00
> /usr/local/apache2/bin/httpd -k start
> nobody    9446 20389  0 11:08 ?        00:00:00
> /usr/local/apache2/bin/httpd -k start
> nobody    9495 20389  0 11:09 ?        00:00:00
> /usr/local/apache2/bin/httpd -k start
> root     10431  6343  0 11:50 pts/1    00:00:00 grep httpd

April 22nd was the last restart. I know you said you've restarted
multiple times but since I don't know when you modified the groups file,
I'd suggest stopping and restarting (reload or HUP isn't sufficient).
This is my next best guess.
 
[more snips]

> 
> 	Error: Could not open command file
> '/usr/local/nagios/var/rw/nagios.cmd' for update!
> 
> 
> 
> 	The permissions on the external command file and/or directory
may be
> incorrect. Read the FAQs on how to setup proper permissions.

This really is indicative of a file system permissions issue. Does your
apache error_log provide any more useful information? Is that were the
stat() error came from? Everything else looks fine with the exception of
the possible need for a hard restart of apache.
 

--
Marc


-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id5hix
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list