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

Daniel Bareiro daniel-listas at gmx.net
Sun May 18 23:26:06 CEST 2008


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080518/4382bbf0/attachment.sig>
-------------- 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