Re: [Nagios-users] Could not open command file '/usr/local/nagios/var/rw/nagios.cmd'

2008-05-18 Thread Simon Finch
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 <[EMAIL PROTECTED]> 19/05/2008 7:26 am >>>
On Sunday, 18 May 2008 17:34:31 +,
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.
**

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Nagios-users mailing list
[email protected]
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

Re: [Nagios-users] Could not open command file '/usr/local/nagios/var/rw/nagios.cmd'

2008-05-18 Thread Daniel Bareiro
On Sunday, 18 May 2008 17:34:31 +,
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


signature.asc
Description: Digital signature
-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Nagios-users mailing list
[email protected]
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

Re: [Nagios-users] Could not open command file '/usr/local/nagios/var/rw/nagios.cmd'

2008-05-18 Thread Morris, Patrick
> 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.

There are at least a couple ways to fix this. One would be to recompile Nagios 
to use a group your webserver is a member of.  Another would be to set the "rw" 
directory setgid www-data so new files created there have that as their group. 
For that to work, the nagios user would also need to be a member of www-data.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Nagios-users mailing list
[email protected]
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


[Nagios-users] Could not open command file '/usr/local/nagios/var/rw/nagios.cmd'

2008-05-18 Thread Daniel Bareiro
Hi!

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?

Tnaks in advance.

Regards,
Daniel
-- 
Daniel Bareiro - System Administrator
Fingerprint: BFB3 08D6 B4D1 31B2 72B9  29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Lennt - Linux user #188.598


signature.asc
Description: Digital signature
-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Nagios-users mailing list
[email protected]
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