[SOLVED] - temporary mail file: permission denied


#1

I have nagios set up and configured the way I want, but it refuses to notify the email address I send it when our test server goes down. It sees it as down in the web interface, but when it tries to email, I get this error in Konsole:

temporary mail file: permission denied

I am using /bin/mail for my command-based email client. I can successfully email a test message using

/bin/mail only fails when the command is called from nagios.
I gave the user “nagios” full rw rights to everything in /usr/local/nagios, /usr/bin/mail, and /var/mail. “nagios” is a member of the apache, mail, nagios, and even root groups. My mail log didn’t seem to have anything about that, but I can post it if it would make it easier for you to help me out.

System information: PCLinuxOS, kernel 2.6.18.8.

Thanks for the help!


#2

Hi,
just for debugging… did you try to run your test command as user nagios (or whoever is running the nagios daemon)? Did you try to run it having changed directory to / ?

Good luck
Ivan


#3

I wasn’t at first, but after your suggestion I tried it–it worked!

Apparently the user permissions just got all confused when nagios was running as one user and the shell was logged in as another.

Thanks for the help!