Could not open command file '/usr/local/nagios/var/rw/nagios.cmd'

Simon Finch finchs at stgeorge.com.au
Mon May 19 02:28:06 CEST 2008


Hi Daniel,
 
I am new to Nagios and I had the same problem with a new install of 3.0.1 on RHES4.
 
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.
 
HTH,
 
Simon Finch
ESM Team Leader
St.George Bank
Australia

>>> Daniel Bareiro <daniel-listas at gmx.net> 19/05/2008 7:26 am >>>
On Sunday, 18 May 2008 17:34:31 +0000,
Morris, Patrick wrote:

> > I've update the Nagios version from 3.0b5 to 3.0.1 stable. But
> > re-scheduling a new check for a service I get:

> > -----------------------------------------------------------------------

> > 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.

> > An error occurred while attempting to commit your command for
> > processing.
> > -----------------------------------------------------------------------

> > sparky:/usr/local/nagios/var/rw# ll
> > total 0
> > prw-rw---- 1 nagios nagios 0 2008-05-18 10:38 nagios.cmd
> > sparky:/usr/local/nagios/var/rw# id nagios
> > uid=1001(nagios) gid=1001(nagios) groups=1001(nagios),1002(nagcmd)
> > sparky:/usr/local/nagios/var/rw# id www-data
> > uid=33(www-data) gid=33(www-data) groups=33(www-data),1002(nagcmd)

> > The permissions are according to Ubuntu Quickstart. Changing the
> > group of nagios.cmd to nagcmd I get rid of the problem. But
> > restarting Nagios, the nagios.cmd permissions are reset to
> > nagios:nagios. What can be the problem?

> Sounds like when you updated you compiled with a different user and/or
> group than your older version.

I upgrade follow this [1] guide, using:

./configure --with-command-group=nagcmd
make all
make install

Previously I did not make changes in the users or groups. These are:

sparky:/usr/local/nagios/var/rw# id nagios
uid=1001(nagios) gid=1001(nagios) groups=1001(nagios),1002(nagcmd)
sparky:/usr/local/nagios/var/rw# id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data),1002(nagcmd)

In case it is of utility, after to run the 'configure', this is the
summary that I obtain:

*** Configuration summary for nagios 3.0.1 05-16-2008 ***:

General Options:
-------------------------
        Nagios executable:  nagios
        Nagios user/group:  nagios,nagios
       Command user/group:  nagios,nagcmd
            Embedded Perl:  no
             Event Broker:  yes
        Install ${prefix}:  /usr/local/nagios
                Lock file:  ${prefix}/var/nagios.lock
   Check result directory:  ${prefix}/var/spool/checkresults
           Init directory:  /etc/init.d
  Apache conf.d directory:  /etc/apache2/conf.d
             Mail program:  /usr/bin/mail
                  Host OS:  linux-gnu

Web Interface Options:
------------------------
                 HTML URL:  http://localhost/nagios/ 
                  CGI URL:  http://localhost/nagios/cgi-bin/ 
Traceroute (used by WAP):  /usr/sbin/traceroute


Thanks for your reply, Patrick.

Regards,
Daniel

[1] http://nagios.sourceforge.net/docs/3_0/upgrading.html 
-- 
Daniel Bareiro - System Administrator
Fingerprint: BFB3 08D6 B4D1 31B2 72B9  29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Lenny - Linux user #188.598

**********************************************************************
*****   IMPORTANT INFORMATION    *****
This document should be read only by those persons to whom it is 
addressed and its content is not intended for use by any other 
persons.  If you have received this message in error, please notify 
us immediately.  Please also destroy and delete the message from 
your computer.  Any unauthorised form of reproduction of this message 
is strictly prohibited.

St George Bank Limited AFSL 240997, Advance Asset Management Limited 
AFSL 240902,  St George Life Limited AFSL 240900, ASGARD Capital Management Limited 
AFSL 240695 and Securitor Financial Group Limited AFSL 240687 is not liable for 
the proper and complete transmission of the information contained in 
this communication, nor for any delay in its receipt.
**********************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080519/558ae599/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- next part --------------
_______________________________________________
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