Error:Unable to write to temp_path('/tmp')-Permission denied

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

Error:Unable to write to temp_path('/tmp')-Permission denied

Postby nagiostool » Mon Jan 02, 2012 7:41 am

Hi i have a problem while restarting nagios service and the following is the error message.
Please help me

Checking hosts.. Checked 40 hosts Checking host groups.. Checked 2 host groups Checking service groups.. Checked 2 service groups Checking contacts.. Checked 13 contacts Checking contact groups.. Checked 3 contact groups Checking service escalations.. Checked 0 service escalations Checking service dependencies.. Checked 0 service dependencies Checking host escalations.. Checked 70 host escalations Checking host dependencies.. Checked 0 host dependencies Checking commands.. Checked 77 commands Checking time periods.. Checked 20 time periods Checking for circular paths between hosts.. Checking for circular host and service dependencies.. Checking global event handlers.. Checking obsessive compulsive processor commands.. Checking misc settings.. Error: Unable to write to temp_path ('/tmp') - Permission denied

Total Warnings: 303
Total Errors: 1

***> One or more problems was encountered while running the pre-flight check..
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed
nagiostool
 
Posts: 72
Joined: Wed Jul 20, 2011 2:17 am

Re: Error:Unable to write to temp_path('/tmp')-Permission de

Postby lmiltchev » Mon Jan 02, 2012 1:13 pm

Go to Admin->Monitoring Config->Check File Permissions and make sure they are OK.

Go to Admin->System Config->Reset Security Credentials and click on "Update Credentials".

You can also run in terminal:
Code: Select all
# cd /usr/local/nagiosxi/scripts
# ./reset_config_perms


If this is not helping with your permissions issues, try fixing your global permissions, following the steps in this document:
http://assets.nagios.com/downloads/nagiosxi/docs/Fixing_Global_Permissions.pdf

Hope this helps.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 12025
Joined: Mon May 23, 2011 12:15 pm

Re: Error:Unable to write to temp_path('/tmp')-Permission de

Postby nagiostool » Mon Jan 02, 2012 11:35 pm

lmiltchev wrote:Go to Admin->Monitoring Config->Check File Permissions and make sure they are OK.

Go to Admin->System Config->Reset Security Credentials and click on "Update Credentials".

You can also run in terminal:
Code: Select all
# cd /usr/local/nagiosxi/scripts
# ./reset_config_perms


If this is not helping with your permissions issues, try fixing your global permissions, following the steps in this document:
http://assets.nagios.com/downloads/nagiosxi/docs/Fixing_Global_Permissions.pdf

Hope this helps.


I have tried everything which was said by you but didn't work, the file permissions are also fine no problem with them.

When i tried to edit one of the host templet and apply configuration i got an error in the snapshot it was reflecting the below error


Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Error in configuration file '/usr/local/nagios/etc/nagios.cfg' - Line 158 (Temp path is not a valid directory)
Error processing main config file!



***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.


I'm not able to upload any new monitoring wizards too , its giving the error as upload failed
The above information might be helpfull for you to solve my problem
nagiostool
 
Posts: 72
Joined: Wed Jul 20, 2011 2:17 am

Re: Error:Unable to write to temp_path('/tmp')-Permission de

Postby scottwilkerson » Tue Jan 03, 2012 10:58 am

Somehow your directory permissions must have gotten buggered up

First, lets do this
Code: Select all
chmod 1777 /tmp


If for some reason you get an error like this:
chmod: cannot access `/tmp': No such file or directory

Then run
Code: Select all
mkdir /tmp
chmod 1777 /tmp
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 14850
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Error:Unable to write to temp_path('/tmp')-Permission de

Postby lmiltchev » Tue Jan 03, 2012 11:09 am

Open your "nagios.cfg" file in a text editor:
Code: Select all
# vi /usr/local/nagios/etc/nagios.cfg

Find line 158 - in vi, you can show numbers by typing:
Code: Select all
:set number

You should see:
Code: Select all
temp_path=/tmp

Also, type this command in terminal and post the output:
Code: Select all
# ls -l /
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 12025
Joined: Mon May 23, 2011 12:15 pm

Re: Error:Unable to write to temp_path('/tmp')-Permission de

Postby nagiostool » Wed Jan 04, 2012 1:25 am

scottwilkerson wrote:Somehow your directory permissions must have gotten buggered up

First, lets do this
Code: Select all
chmod 1777 /tmp


If for some reason you get an error like this:
chmod: cannot access `/tmp': No such file or directory

Then run
Code: Select all
mkdir /tmp
chmod 1777 /tmp


Thanks a lot the above command worked
nagiostool
 
Posts: 72
Joined: Wed Jul 20, 2011 2:17 am

Re: Error:Unable to write to temp_path('/tmp')-Permission de

Postby scottwilkerson » Wed Jan 04, 2012 11:10 am

Glad we got if fixed
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 14850
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Error:Unable to write to temp_path('/tmp')-Permission de

Postby lsazzad » Tue Apr 14, 2015 12:46 pm

Hi,

I am in a serious problem. I was unable to change nagios files using a user. So, changed file permission & created a group. But after that NAGIOS isn't getting process status.
I have executed following commands.

groupadd local_users
usermod -a -G local_users sabuj
chown -R root:local_users /usr/local
chmod -R 2775 /usr/local
find /usr/local -type f -exec chmod 0774 '{}' \;

I have added nagios user into local_user group. But no result. Do, i need to add some more user? In that case i want to undone it.

How i can undone it? Please reply ASAP>>>>
Regards
Sazzad
lsazzad
 
Posts: 72
Joined: Tue Apr 07, 2015 6:52 am
Location: ​Osnabrück, Deutschland

Re: Error:Unable to write to temp_path('/tmp')-Permission de

Postby Box293 » Tue Apr 14, 2015 6:55 pm

This is a very old thread you've added your question to.

Can you please create a new thread with your problem.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

ALL of my Projects on the Nagios Exchange

Check out my Nagios website
User avatar
Box293
Too Basu
 
Posts: 4765
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia


Return to Nagios XI

Who is online

Users browsing this forum: tribal and 17 guests