nagios.cmd: who else needs to CHMOD after Rest arts?

Daris Drake daris.drake at eassist.com
Tue Nov 26 00:38:55 CET 2002


Following those instructions, I get the following error when issuing
commands:

Error: Could not stat() command file '/usr/local/nagios/var/rw/nagios.cmd'!

--Daris

 -----Original Message-----
From: 	Carroll, Jim P [Contractor] [mailto:jcarro10 at sprintspectrum.com] 
Sent:	Monday, November 25, 2002 11:25 AM
To:	'patrick.amirian at cognicase.ca'; 'Daris Drake';
nagios-users at lists.sourceforge.net
Subject:	RE: RE : [Nagios-users] nagios.cmd: who else needs to CHMOD
after Restarts? (Mike McLure)

I may have missed something crucial in the thread, but... let me take a stab
at this.

I can't imagine that you'll need to recompile nagios with any different
user/group.

I believe this has been mentioned recently, but it bears being mentioned
again.  It's documented (somewhere), but I know I've had trouble finding it
again.  This could/should be added to the FAQ (and maybe I'm just the man to
do it, once I take care of some things here).

You need to create a group, such as 'nagiocmd' (note that it's not
'nagioscmd').  Add nagios to the group.  Add apache (or whatever webserver
you're using) to the group.

Now change to /usr/local/nagios/var and do the following:

   chown nagios:nagiocmd rw
   chmod 2770 rw

Restart nagios and you should be good to go.  (You may have to restart
apache, but I suspect not.)

jc

> -----Original Message-----
> From: Patrick Amirian [mailto:pamirian at calculus.ca]
> Sent: Monday, November 25, 2002 12:11 PM
> To: 'Daris Drake'; nagios-users at lists.sourceforge.net
> Subject: RE : [Nagios-users] nagios.cmd: who else needs to CHMOD after
> Restarts? (Mike McLure)
> 
> 
> 
> 
> Me but that's because my apache and nagios do not have the same
> user/group.
> 
> Next time I'll compile nagios, I'll compile it with 
> user/group nobody or
> whatever that apaches runs as.
> 
> -----Message d'origine-----
> De : nagios-users-admin at lists.sourceforge.net
> [mailto:nagios-users-admin at lists.sourceforge.net] De la part de Daris
> Drake
> Envoyé : 25 novembre, 2002 13:10
> À : 'nagios-users at lists.sourceforge.net'
> Objet : Re: [Nagios-users] nagios.cmd: who else needs to CHMOD after
> Restarts? (Mike McLure)
> 
> Mike: 
> 
> The problem you see is that you cannot issue commands to 
> nagios from the
> web
> interface (you get "there was an error processing your 
> command. Go back
> from
> whence you came."). I am guessing but any writes to cgi.cmd 
> from cmd.cgi
> are
> failing permissions. Is this an issue with the user/group I compiled
> with?
> Does the nagiosadmin user have to be a member of the nagios group
> locally?
> We are using "nagios" as the compiled user and "nagiosadmin" 
> as the cgi
> user. 
> 
> I realize we opened that file up to everyone but it was the quick fix
> while
> we tried to figure out what the issue really was/is. 
> 
> - Daris
> 
> > What are the symptoms of this issue you are talking about?
> >
> > Why would you want any user on the system to be able to 
> write to that
> pipe
> and
> > therefore issue commands?  That's what the permissions you 
> are setting
> there allow.
> >
> > - Mike
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Get the new Palm Tungsten T 
> handheld. Power & Color in a compact size! 
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Get the new Palm Tungsten T 
> handheld. Power & Color in a compact size! 
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en




More information about the Users mailing list