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

2008-06-09 Thread Marc Powell

On Jun 8, 2008, at 7:48 AM, howard chen wrote:

>
> But seems when I restarted the nagios, permission reset, so I am
> looking for the correct method to set the permission.
>
>
> Below is the  information which might be useful:
> ===
> ls -l /usr/local/nagios/var/rw/nagios.cmd
> prw-rw 1 nagios nagcmd 0 Jun  8 20:46 /usr/local/nagios/var/rw/ 
> nagios.cmd
>
>
> id nagios
> uid=504(nagios) gid=504(nagios) groups=504(nagios),505(nagcmd)
>
>
> cat /etc/group | grep nagcmd
> nagcmd:x:505:apache,nagios
>

apache has been restarted since adding it to the nagcmd group? Also,  
if you have SELinux enabled, the quickstart only talks about setting  
context for share and sbin, not the rw directory. Apache is going to  
need write access to var/rw/nagios.cmd in order to write data to the  
pipe.

--
Marc


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
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] Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!

2008-06-09 Thread James
On Sun, June 8, 2008 8:48 am, howard chen wrote:
> Hi,
>
>
> I have followed the tutorial on this page to install nagios on CentOS5.1
>
>
> http://nagios.sourceforge.net/docs/3_0/quickstart-fedora.html
>
>
>
> I have repeated the whole procedures at least "3" time, but still
> can't get it to work...
>
> Say when I try to enable a notification in the web interface, error
> always return:
>
> Error: Could not open command file
> '/usr/local/nagios/var/rw/nagios.cmd' for update!
>
>
> I know the problem came from permission, so I managed to get this work
> by:
>
>
> chmod 777 /usr/local/nagios/var/rw/nagios.cmd
>
>
> But seems when I restarted the nagios, permission reset, so I am
> looking for the correct method to set the permission.
>
>
> Below is the  information which might be useful:
> ===
> ls -l /usr/local/nagios/var/rw/nagios.cmd prw-rw 1 nagios nagcmd 0 Jun
> 8 20:46 /usr/local/nagios/var/rw/nagios.cmd
>
>
>
> id nagios uid=504(nagios) gid=504(nagios) groups=504(nagios),505(nagcmd)
>
>
> cat /etc/group | grep nagcmd nagcmd:x:505:apache,nagios
>
>
>
>
> Regards.
>
>
> Howard
>
>
> -
>  Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> ___
> 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
>
>
Check the permissions on the directory:
/local/nagios/var/rw

The file is a pipe that is created when nagios is run.
It should not exist is nagios is stopped.



-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
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