[Nagios-users] nagios.cmd permission issue

Ilan Berkner iberkner at gmail.com
Sun Oct 3 17:24:33 UTC 2010


I followed the instructions in commandfile.html documentation to the letter,
its still not working.

Its clearly a permissions issue between the user that the web server is
running as and the user that nagios is running is.  I did create a nagcmd
group where both users are a part of and set up the sticky bit, but no luck.

I am running Nginx web server, not Apache so maybe there's some kind of
configuration issue that has to be dealt with, does anyone have any
experience with Nginx, Nagios and the command file?

Thanks

On Sun, Oct 3, 2010 at 9:57 AM, Martin Melin <mmelin at gmail.com> wrote:

> Have a look at this page from the official docs:
> http://nagios.sourceforge.net/docs/2_0/commandfile.html
>
> <http://nagios.sourceforge.net/docs/2_0/commandfile.html>Do as it says and
> things will work.
>
> Re: your second question, just look in nagios.conf.
>
> <http://nagios.sourceforge.net/docs/2_0/commandfile.html>Best regards,
> Martin Melin
>
>
> On Sun, Oct 3, 2010 at 3:48 PM, Ilan Berkner <iberkner at gmail.com> wrote:
>
>> Did not work, probably b/c I'm restarting the service as root?
>>
>> Is there a way to tell under which user nagios is trying to access the
>> nagios.cmd file?
>>
>>
>> On Sun, Oct 3, 2010 at 5:03 AM, Rutger Blom <rutger at blokje.net> wrote:
>>
>>> Set the sticky bit on the directory.
>>>
>>> Rutger
>>>
>>> On Sun, Oct 3, 2010 at 8:55 AM, Ilan Berkner <iberkner at gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> New to Nagios...
>>>>
>>>> Got everything pretty much running, except when I try to modify things
>>>> using the web interface, I get this error:
>>>>
>>>> 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.
>>>>
>>>>
>>>> This is clearly a permission issue as when I manually change the
>>>> permissions of the /rw/nagios.cmd to 777 for example, it works fine.  When
>>>> the service is restarted and the pipe is recreated though, the permissions
>>>> are re-set.
>>>>
>>>> I am running the nginx web server, not apache.
>>>>
>>>> SELinux is disabled.
>>>>
>>>> The rw directory has 777 permissions and is owned by the nagios user and
>>>> group.
>>>>
>>>> The Nginx server runs under a different user / group and this could be
>>>> the issue.  However, I tried to set up the rw directory with that user and
>>>> group and still no luck.
>>>>
>>>> Help?
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Start uncovering the many advantages of virtual appliances
>>>> and start using them to simplify application deployment and
>>>> accelerate your shift to cloud computing.
>>>> http://p.sf.net/sfu/novell-sfdev2dev
>>>> _______________________________________________
>>>> 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
>>>>
>>>
>>>
>>>
>>> --
>>> Rutger Blom
>>> Luzernvägen 14
>>> 227 38 LUND
>>> Sweden
>>> Tel. +46 763 46 99 44
>>> www.rutgerblom.com
>>>
>>> <http://delicious.com/rbml77>  <http://www.facebook.com/rutgerblom>
>>> <http://foursquare.com/user/rutgerblom> <http://www.linkedin.com/in/rutgerblom>
>>> <http://picasaweb.google.com/rutger.blom>
>>> <http://twitter.com/rutgerblom>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Start uncovering the many advantages of virtual appliances
>>> and start using them to simplify application deployment and
>>> accelerate your shift to cloud computing.
>>> http://p.sf.net/sfu/novell-sfdev2dev
>>> _______________________________________________
>>> 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
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Start uncovering the many advantages of virtual appliances
>> and start using them to simplify application deployment and
>> accelerate your shift to cloud computing.
>> http://p.sf.net/sfu/novell-sfdev2dev
>> _______________________________________________
>> 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
>>
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nagios.com/pipermail/nagios-users/attachments/20101003/bd75b186/attachment.html>


More information about the Nagios-users mailing list