<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.6000.16640" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Hi Daniel,</DIV>
<DIV> </DIV>
<DIV>I am new to Nagios and I had the same problem with a new install of 3.0.1 on RHES4.</DIV>
<DIV> </DIV>
<DIV>The fix for me was to apply the rights to the rw directory instead of the nagios.cmd file as the file gets recreated regularly and will loose any rights you apply to it.</DIV>
<DIV> </DIV>
<DIV>HTH,</DIV>
<DIV> </DIV>
<DIV>Simon Finch</DIV>
<DIV>ESM Team Leader</DIV>
<DIV>St.George Bank</DIV>
<DIV>Australia<BR><BR>>>> Daniel Bareiro <daniel-listas@gmx.net> 19/05/2008 7:26 am >>><BR>On Sunday, 18 May 2008 17:34:31 +0000,<BR>Morris, Patrick wrote:<BR><BR>> > I've update the Nagios version from 3.0b5 to 3.0.1 stable. But<BR>> > re-scheduling a new check for a service I get:<BR><BR>> > -----------------------------------------------------------------------<BR><BR>> > Error: Could not open command file<BR>> > '/usr/local/nagios/var/rw/nagios.cmd' for update!<BR><BR>> > The permissions on the external command file and/or directory may be<BR>> > incorrect. Read the FAQs on how to setup proper permissions.<BR><BR>> > An error occurred while attempting to commit your command for<BR>> > processing.<BR>> > -----------------------------------------------------------------------<BR><BR>> > sparky:/usr/local/nagios/var/rw# ll<BR>> > total 0<BR>> > prw-rw---- 1 nagios nagios 0 2008-05-18 10:38 nagios.cmd<BR>> > sparky:/usr/local/nagios/var/rw# id nagios<BR>> > uid=1001(nagios) gid=1001(nagios) groups=1001(nagios),1002(nagcmd)<BR>> > sparky:/usr/local/nagios/var/rw# id www-data<BR>> > uid=33(www-data) gid=33(www-data) groups=33(www-data),1002(nagcmd)<BR><BR>> > The permissions are according to Ubuntu Quickstart. Changing the<BR>> > group of nagios.cmd to nagcmd I get rid of the problem. But<BR>> > restarting Nagios, the nagios.cmd permissions are reset to<BR>> > nagios:nagios. What can be the problem?<BR><BR>> Sounds like when you updated you compiled with a different user and/or<BR>> group than your older version.<BR><BR>I upgrade follow this [1] guide, using:<BR><BR>./configure --with-command-group=nagcmd<BR>make all<BR>make install<BR><BR>Previously I did not make changes in the users or groups. These are:<BR><BR>sparky:/usr/local/nagios/var/rw# id nagios<BR>uid=1001(nagios) gid=1001(nagios) groups=1001(nagios),1002(nagcmd)<BR>sparky:/usr/local/nagios/var/rw# id www-data<BR>uid=33(www-data) gid=33(www-data) groups=33(www-data),1002(nagcmd)<BR><BR>In case it is of utility, after to run the 'configure', this is the<BR>summary that I obtain:<BR><BR>*** Configuration summary for nagios 3.0.1 05-16-2008 ***:<BR><BR>General Options:<BR>-------------------------<BR>        Nagios executable:  nagios<BR>        Nagios user/group:  nagios,nagios<BR>       Command user/group:  nagios,nagcmd<BR>            Embedded Perl:  no<BR>             Event Broker:  yes<BR>        Install ${prefix}:  /usr/local/nagios<BR>                Lock file:  ${prefix}/var/nagios.lock<BR>   Check result directory:  ${prefix}/var/spool/checkresults<BR>           Init directory:  /etc/init.d<BR>  Apache conf.d directory:  /etc/apache2/conf.d<BR>             Mail program:  /usr/bin/mail<BR>                  Host OS:  linux-gnu<BR><BR>Web Interface Options:<BR>------------------------<BR>                 HTML URL:  <A href="http://localhost/nagios/">http://localhost/nagios/</A><BR>                  CGI URL:  <A href="http://localhost/nagios/cgi">http://localhost/nagios/cgi</A>-bin/<BR>Traceroute (used by WAP):  /usr/sbin/traceroute<BR><BR><BR>Thanks for your reply, Patrick.<BR><BR>Regards,<BR>Daniel<BR><BR>[1] <A href="http://nagios.sourceforge.net/docs/3_0/upgrading.html">http://nagios.sourceforge.net/docs/3_0/upgrading.html</A><BR>-- <BR>Daniel Bareiro - System Administrator<BR>Fingerprint: BFB3 08D6 B4D1 31B2 72B9  29CE 6696 BF1B 14E6 1D37<BR>Powered by Debian GNU/Linux Lenny - Linux user #188.598<BR></DIV>
<p><span style="font-family:'Arial';font-size:8pt;">**********************************************************************</span></p>
<p><span style="font-family:'Arial';font-size:8pt;">*****   IMPORTANT INFORMATION    *****</span></p>
<p><span style="font-family:'Arial';font-size:8pt;">This document should be read only by those persons to whom it is </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">addressed and its content is not intended for use by any other </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">persons.  If you have received this message in error, please notify </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">us immediately.  Please also destroy and delete the message from </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">your computer.  Any unauthorised form of reproduction of this message </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">is strictly prohibited.</span></p>
<p><span style="font-family:'Arial';font-size:8pt;"></span></p>
<p><span style="font-family:'Arial';font-size:8pt;"> </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">St George Bank Limited AFSL 240997, Advance Asset Management Limited </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">AFSL 240902,  St George Life Limited AFSL 240900, ASGARD Capital Management Limited </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">AFSL 240695 and Securitor Financial Group Limited AFSL 240687 is not liable for </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">the proper and complete transmission of the information contained in </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">this communication, nor for any delay in its receipt.</span></p>
<p><span style="font-family:'Arial';font-size:8pt;">**********************************************************************</span></p>
<p><span style="font-family:'Arial';font-size:8pt;"> </span></p></BODY></HTML>