Page 1 of 1

Upgrade from 2024R2.1 to 2024R2.2 Issue

Posted: Thu Sep 04, 2025 5:34 am
by McTylan
I'm running into a weird issue trying to upgrade to 2024R2.2. I've never had an issue running the following commands before:

Code: Select all

cd /tmp
sudo wget -O upgrade.sh https://assets.nagios.com/downloads/nagiosxi/upgrade.sh
sudo sh ./upgrade.sh
But now I get this error:

Code: Select all

Checking misc settings...
        Error: Unable to write to temp_path ('/tmp') - Permission denied

Total Warnings: 6
Total Errors:   1
I noticed this script is now changing my /tmp permissions to 1003:1003 as seen here:

Code: Select all

drwxr-xr-x.  15 1003 1003 4096 Sep  4 06:24 tmp
I then tried to install the upgrade via this command set:

Code: Select all

cd /tmp
sudo rm -rf nagiosxi xi*.tar.gz
sudo wget http://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
sudo tar xzf xi-latest.tar.gz
cd nagiosxi
sudo ./upgrade
And it does the same thing. I also tried via the Web Interface and same thing.

Re: Upgrade from 2024R2.1 to 2024R2.2 Issue

Posted: Thu Sep 04, 2025 11:24 am
by mkimitch
The XI upgrade scripts shouldn’t change /tmp ownership; the error is because /tmp isn’t the standard sticky, world-writable temp dir.

Reset /tmp and verify:

Code: Select all

sudo chown root:root /tmp
sudo chmod 1777 /tmp

# If you're on RHEL/CentOS/Rocky/Alma with SELinux:
sudo restorecon -Rv /tmp

# Verify (should show sticky bit and root ownership):
ls -ldZ /tmp
# expect: drwxrwxrwt. root root ... /tmp
If that looks correct, re-run the upgrade (HTTPS to avoid MITM/caching issues):

Code: Select all

cd /tmp
sudo rm -rf nagiosxi xi*.tar.gz upgrade.sh
sudo curl -fsSLo upgrade.sh https://assets.nagios.com/downloads/nagiosxi/upgrade.sh
sudo bash ./upgrade.sh
If it still fails, try:

Code: Select all

# If /tmp is mounted noexec:
sudo mount -o remount,exec /tmp

# Or avoid /tmp entirely:
cd /var/tmp
sudo curl -fsSLo upgrade.sh https://assets.nagios.com/downloads/nagiosxi/upgrade.sh
sudo bash ./upgrade.sh
If none of the above resolves it, please open a Support ticket and include these outputs plus upgrade.log so the team can take a closer look:

Code: Select all

ls -ldZ /tmp /var/tmp
mount | grep ' /tmp '
getenforce
id
df -h /tmp /var/tmp
cat /etc/os-release
tail -n 200 /usr/local/nagiosxi/var/upgrade.log
# If SELinux=Enforcing, any AVCs:
sudo ausearch -m AVC,USER_AVC -ts recent | audit2why

Re: Upgrade from 2024R2.1 to 2024R2.2 Issue

Posted: Thu Sep 04, 2025 12:49 pm
by McTylan
Thanks for your reply. None of that worked and it keeps trying to set the /tmp to 1003:1003. I've gathered the information you mentioned and opened a support case.

Re: Upgrade from 2024R2.1 to 2024R2.2 Issue

Posted: Fri Sep 05, 2025 4:32 am
by driftbossunblocked
McTylan wrote: Thu Sep 04, 2025 12:49 pm Thanks for your reply. None of that worked and it keeps trying to set the /tmp to 1003:1003. I've gathered the information you mentioned and opened a support case.
Did you get help yet? I would love to hear how you solved this!

Re: Upgrade from 2024R2.1 to 2024R2.2 Issue

Posted: Fri Sep 05, 2025 9:37 am
by ajwilliamson
I get the same error on three different systems.

Re: Upgrade from 2024R2.1 to 2024R2.2 Issue

Posted: Mon Sep 08, 2025 11:21 am
by dscrimpsher
I am getting this same error also. I am running on Ubuntu 24.04.
Owner of the /Tmp folder is also 1003:1003.

I never noticed the perms on the /tmp before this so no telling if this is normal or not.
This is the complete output from the upgrade script:

/tmp/nagiosxi# ./upgrade
Checking install type...
Install type: source

Installation check passed.

IMPORTANT: Before upgrading, verify you have both a valid system backup as well as a configuration backup
of Nagios XI before continuing! More information about backing up and restoring Nagios XI can be found here:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

NOTICE: Your Nagios XI license includes a test environment instance that allows you to verify successful upgrade and configuration
changes before applying them to your production environment. As a best practice for ensuring the reliability of your monitoring
systems, we advise you to upgrade your test environment before upgrading any production instances. More information on licensing
can be found here: https://assets.nagios.com/handouts/nagi ... Policy.pdf

Are you sure you want to continue? [y/N] y
Proceeding with upgrade...
Nagios XI Upgrade Log
==========================
DATE: Mon Sep 8 04:12:40 PM UTC 2025

DISTRO INFO:
Ubuntu
24.04
x86_64


chown: warning: '.' should be ':': ‘root.nagios’
chown: warning: '.' should be ':': ‘root.nagios’
Archive: sourceguardian/ixed4.lin.x86-64.zip
inflating: /usr/lib/php/20230831/ixed.8.3.lin
Sourceguardian extension found for PHP version 8.3
Removing backup loader...
Sourceguardian extension already in php.ini
Checking required prereqs...
Please wait...

Operation timed out after 15001 milliseconds with 0 bytes received
OLD VERSION: 70100
mysql: [Warning] Using a password on the command line interface can be insecure.

Nagios Core 4.5.9
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2024-12-19
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 928 services.
Checked 50 hosts.
Checked 18 host groups.
Checked 15 service groups.
Checked 11 contacts.
Checked 8 contact groups.
Checked 184 commands.
Checked 21 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 50 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 21 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Error: Unable to write to temp_path ('/tmp') - Permission denied

Total Warnings: 0
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 definitions. 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.

Re: Upgrade from 2024R2.1 to 2024R2.2 Issue

Posted: Mon Sep 08, 2025 11:43 am
by dscrimpsher
I resolved this by updating the perms for /tmp.
My /tmp folder was:
drwxr-xr-x 17 1003 1003 4096 Sep 8 16:12 tmp

Not sure how that got changed from the default. This was a clean Ubuntu 24.04 server with only Nagios XI installed.

I ran these commands:
cd /
chmod 1777 tmp
chown root:root tmp

After my /tmp folder looks like this:
drwxrwxrwt 17 root root 4096 Sep 8 16:25 tmp

Then I was ablet o run the nagioxxi/upgrade.sh script normally.

...strange issue.

Re: Upgrade from 2024R2.1 to 2024R2.2 Issue

Posted: Mon Sep 08, 2025 2:15 pm
by smeadows
I had the same issue, and this worked for me:

cd /tmp/nagiosxi
chown root:root /tmp
chmod 1777 /tmp
bash -x ./upgrade

Previous upgrades we ran "sh ./upgrade" but that wasn't working this time. The command "bash -x ./upgrade" worked after fixing the permissions.

Re: Upgrade from 2024R2.1 to 2024R2.2 Issue

Posted: Tue Sep 09, 2025 4:27 pm
by DoubleDoubleA
Hey everybody,

Regarding this upgrade issue, here at Nagios we made a number of updates and changes to our internal build process for our release artifacts, this is a bug with that new process where we mistakenly changed permissions. There are conditions where this bug does not appear on upgrade, and internally those were the conditions we had set up for testing, and we missed the bug.

The permission changes y'all noted here do indeed seem to work to get the upgrade done, and the feedback here helped us chase down the bug.

We're correcting the bug and the internal testing process. This one shouldn't appear again, and we'll have new latest XI artifacts soon.

Aaron

Product Development Manager

Re: Upgrade from 2024R2.1 to 2024R2.2 Issue

Posted: Wed Sep 10, 2025 5:29 am
by McTylan
This was what Nagios Support had me do to resolve:

Code: Select all

sudo su
chmod 1777 /tmp
chown root:root /tmp
systemctl restart nagios npcd 
And then (still as sudo su):

Code: Select all

mkdir /tmp/tmpinstall
cd /tmp/tmpinstall
wget http://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
tar xzf xi-latest.tar.gz
chown -R root:root /tmp/tmpinstall
cd ./nagiosxi
./upgrade