Permission error on /usr/local/nagios/var/rw/nagios.cmd

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
User avatar
t3dus
Posts: 161
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:

Permission error on /usr/local/nagios/var/rw/nagios.cmd

Post by t3dus »

I accidently chmoded my nagios folder to 755 the other day which caused the error below when I go to acknowledge a problem.

I tried the steps here to fix it but it didn't fix anything...

Code: Select all

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.
User avatar
t3dus
Posts: 161
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:

Re: Permission error on /usr/local/nagios/var/rw/nagios.cmd

Post by t3dus »

tried to chmod the folder/file to 0655 but no dice either.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Permission error on /usr/local/nagios/var/rw/nagios.cmd

Post by mcapra »

For the sake of argument, can you share:

Code: Select all

ls -al /usr/local/nagios/var/rw/
You might try setting the sticky bit for the command group. I'd also make sure it's still recognized by the system as a named pipe (p ahead of the perms).
Former Nagios employee
https://www.mcapra.com/
User avatar
t3dus
Posts: 161
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:

Re: Permission error on /usr/local/nagios/var/rw/nagios.cmd

Post by t3dus »

Well I ended up fixing it but not sure it was the easiest route.

What I did was backup my config files, fully removed nagios from the server and reinstalled it. Working now.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Permission error on /usr/local/nagios/var/rw/nagios.cmd

Post by tmcdonald »

Sometimes that is faster/easier than tracking down permissions, especially in cases where there have been a lot of troubleshooting steps done.

Glad it's working now though. Are we okay to close this thread?
Former Nagios employee
User avatar
t3dus
Posts: 161
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:

Re: Permission error on /usr/local/nagios/var/rw/nagios.cmd

Post by t3dus »

Yes close it.
Locked