Page 1 of 1

Error : could not open command file /usr/local/nagios/var/rw

Posted: Fri Oct 26, 2012 2:30 am
by NNC
Getting error
Error : could not open command file /usr/local/nagios/var/rw/nagios.cmd

for update.
The permission on extrnal command file and or dir may b incorct.

Error ocourd whle attmptng to commit

Re: Error : could not open command file /usr/local/nagios/va

Posted: Fri Oct 26, 2012 10:37 am
by NNC
Can anyone reply this

Re: Error : could not open command file /usr/local/nagios/va

Posted: Fri Oct 26, 2012 10:55 am
by slansing
Hello,

Change the ownership for the directory with the following:

Code: Select all

chmod +rwx /usr/local/nagios/var/rw

Re: Error : could not open command file /usr/local/nagios/va

Posted: Fri Oct 26, 2012 2:13 pm
by NNC
Still same error.

Re: Error : could not open command file /usr/local/nagios/va

Posted: Fri Oct 26, 2012 3:41 pm
by slansing
Can you run the following and report the output back here:

Code: Select all

ls -ld /usr/local/nagios/var/rw/

Additionally can you send a copy of your nagios.cfg file, it is locate at:

Code: Select all

/usr/local/nagios/etc/nagios.cfg

Re: Error : could not open command file /usr/local/nagios/va

Posted: Fri Oct 26, 2012 3:43 pm
by mguthrie
Nagios recreates that file after each restart, so updating permissions from the system won't fix that. What are the permissions on that file?

Are external commands enabled in the main nagios.cfg file?
check_external_commands=1

Re: Error : could not open command file /usr/local/nagios/va

Posted: Sat Oct 27, 2012 12:02 pm
by g.turri
Hi,
Look at the last page of this guide where you can find the correct sequence of command to submit

http://giuseppeturri.it/NAGIOS_INSTALLATION_GUIDE.pdf

Let me know

Re: Error : could not open command file /usr/local/nagios/va

Posted: Mon Oct 29, 2012 12:19 pm
by lmiltchev
Is apache member of nagcmd group?

Code: Select all

cat /etc/group | grep nag

Re: Error : could not open command file /usr/local/nagios/va

Posted: Wed Apr 30, 2014 11:52 am
by Bozb
I believe that the correct command would be:

Code: Select all

usermod -G nagios apache
and

Code: Select all

usermod -G nadcmd apache

Re: Error : could not open command file /usr/local/nagios/va

Posted: Wed Apr 30, 2014 4:22 pm
by tmcdonald
Thread is incredibly old so I will be closing this now.