Unable to write to path - what??

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
gregg_hughes_ISC
Posts: 18
Joined: Fri Aug 08, 2014 3:03 pm

Unable to write to path - what??

Post by gregg_hughes_ISC »

Good afternoon, all!

I'm running an older version of Nagios Core (3.2.3) on an Ubuntu 12.04 server. After some updates I can't start the nagios3 demon. The preflight all checks until the end. At the end I get the following:

Checking misc settings...
Error: Unable to write to temp_path ('/var/lib/nagios3/spool/checkresults') - Permission denied
Error: Unable to write to check_result_path ('/var/lib/nagios3/spool/checkresults') - Permission denied

Total Warnings: 0
Total Errors: 2

No one changed the owner or permissions on the directory or the files therein. The owner/group on all the files & folders is nagios | www-data.

I'm sure it's an ownership issue, but I tried setting the permissions to 777 with no success.

Any thoughts from those who have lived in Nagios longer than I?

Thanks!

Gregg
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Unable to write to path - what??

Post by Box293 »

What is the output of:

Code: Select all

ls -al /var/lib/nagios3/spool
cat /etc/passwd
cat /etc/group
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
gregg_hughes_ISC
Posts: 18
Joined: Fri Aug 08, 2014 3:03 pm

Re: Unable to write to path - what??

Post by gregg_hughes_ISC »

Addendum: I have been working on the Nagios server to enable SSH with a key - but I don't see how that would have changed ownership and permissions on that one directory.
gregg_hughes_ISC
Posts: 18
Joined: Fri Aug 08, 2014 3:03 pm

Re: Unable to write to path - what??

Post by gregg_hughes_ISC »

Found it.

We're using Centrify Express to bind servers to Active Directory. There was a "nagios" user in AD and somehow that UID got assigned as owner of the /var/lib/nagios3/spool directory. Double-checked the UID/GID of the rest of the files in the folder, chowned the spool directory to the local nagios UID, and we're back online.

I may have to set up local nagios users on the remote servers to use check_by_ssh.

thanks to all for looking!

Gregg
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Unable to write to path - what??

Post by rkennedy »

Glad to see you caught it! Thanks for posting your resolution as well!

I will now close this thread out, but feel free to open a new one if you ever need assistance in the future.
Former Nagios Employee
Locked