Page 1 of 1

Getting error when using external command [Solved]

Posted: Fri May 25, 2012 4:52 am
by msachikanta
Hi,

I am getting the below error while trying to update External commands like "Send Custom Service Notification" from Nagios Web Interface. Can Someone please help me to resolve this issue..? Thanks in advance.

----------------------------------------------------------------------------------------------------------------------------------------------------------------
Error: Could not open command file '/apps/tools/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.
Return from whence you came
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

I have given the drwxrwsrwx permission for 'rw' directory. refer the below details for rw directory permission.
drwxrwsrwx 2 nagios nagcmd 4096 May 25 10:16 rw

Regards,
Sachikanta

Re: Getting error while trying to update external command

Posted: Fri May 25, 2012 10:40 am
by agriffin
Do all the directories leading up to 'rw' also have good permissions for nagios?

Re: Getting error while trying to update external command

Posted: Mon May 28, 2012 5:32 am
by msachikanta
yes.. infact Nagios is the owner and having 775 permission to all the leading directories to 'rw'. here is the details for your reference.

drwxrwxr-x 11 nagios nagios 4096 Mar 20 15:32 nagios
drwxrwxr-x 5 nagios nagios 4096 May 28 11:28 var
drwxrwsrwx 2 nagios nagcmd 4096 May 25 10:16 rw

Regards,
Sachikanta

Re: Getting error while trying to update external command

Posted: Tue May 29, 2012 1:58 pm
by lmiltchev
Open "/etc/group" in a text editor:

Code: Select all

vi /etc/group
and make sure you have "apache" (if you are using apache) added to the "nagcmd":

Code: Select all

nagcmd:x:501:nagios,apache
Hope this helps.

Re: Error while trying to update external command [solved]

Posted: Fri Jun 15, 2012 1:05 am
by msachikanta
Thanks... it works... :)

additionally i changed the permission for rw directory as below.

chmod -R u=rwx,g=rwxs,o=rwx rw/

then it started working fine.

Regards,
Sachikanta

Re: Getting error while trying to update external command

Posted: Fri Jun 15, 2012 10:51 am
by agriffin
Glad your issue was resolved.