Page 1 of 1

Unable to write to path - what??

Posted: Tue Dec 08, 2015 5:53 pm
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

Re: Unable to write to path - what??

Posted: Tue Dec 08, 2015 5:58 pm
by Box293
What is the output of:

Code: Select all

ls -al /var/lib/nagios3/spool
cat /etc/passwd
cat /etc/group

Re: Unable to write to path - what??

Posted: Tue Dec 08, 2015 6:06 pm
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.

Re: Unable to write to path - what??

Posted: Wed Dec 09, 2015 10:39 am
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

Re: Unable to write to path - what??

Posted: Wed Dec 09, 2015 10:47 am
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.