External Commands not working

John McGowan mcgowan at lynch2.com
Wed Apr 27 22:33:16 CEST 2005



John McGowan wrote:

> No question about this being a permissions issue...  I set the 
> /usr/local/nagios/var/rw directory to 777 and it works fine... 
> Obviously i don't want to have to do that.  So for some reason httpd 
> either isn't executing the cgi script as nobody... or the nagiocmd 
> group that has nobody in it isn't working right...

I can get external command to work if I do the following...


[root at gob rw]# chmod 777 .
[root at gob rw]# chmod g+s .
[root at gob rw]# ls -al
total 8
drwxrwsrwx  2 nagios nagiocmd 4096 Apr 27 15:29 .
drwxrwxr-x  4 nagios nagios   4096 Apr 27 15:30 ..
prw-rw--w-  1 nagios nagiocmd    0 Apr 27 15:29 nagios.cmd

Notice I also have to give world write permissions on nagios.cmd...

/John

>
> /John
>
> John McGowan wrote:
>
>>
>>
>> John McGowan wrote:
>>
>>>
>>>
>>> Marc Powell wrote:
>>>
>>>>  
>>>>
>>>>>-----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]
>>>>  
>>>>
>>> The error I'm seeing  is in the browser...
>>>
>>>>Everything else looks fine with the exception of the possible need for a hard restart of apache.
>>>>  
>>>>
>>> That's a shame, because I did a hard restart and it's still not 
>>> working...
>>>
>>> Should I recompile with some debugging options or something to 
>>> figure out what cmd.cgi is having a problem with?
>>
>>
>> I just noticed a slight difference between before the Hard reset of 
>> apache and now... I am getting a different error in the browser... 
>> it's not complaining about the "stat" failing, it's complaining about 
>> not being able to open the file.... Still doesn't make sense to me, 
>> i've been staring at these permissions for a couple days now, and I 
>> don't understand why it wouldn't work.
>>
>> Just incase it helps I'm using httpd-2.0.52
>>
>> /John
>>
>>>> 
>>>>
>>>>--
>>>>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
>>>>
>>>>  
>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050427/f4129d98/attachment.html>


More information about the Users mailing list