Page 1 of 1

2024R1.3.1 Upgrade fails

Posted: Thu Nov 14, 2024 7:13 am
by tkaufman
We have been hardening server so I am pretty sure it is related.

Nagios XI and Core work fine just upgrade fails


From GUI
Latest Available Version: 2024R1.3.1
Installed Version: 2024R1.3
Last Update Check: 2024-11-13 10:38:11

On a Virtual Machine
DISTRO INFO:
Ubuntu
24.04
x86_64

Error:
################################################################################
chown: warning: '.' should be ':': ‘root.nagios’
chown: warning: '.' should be ':': ‘root.nagios’
Archive: sourceguardian/ixed4.lin.x86-64.zip
checkdir: cannot create extraction directory: /usr/lib64/php/modules
No such file or directory
################################################################################

From cmdline
root@<servername>:/tmp# tar xzf xi-latest.tar.gz
root@<servername>:/tmp# cd nagiosxi
root@<servername>:/tmp/nagiosxi# ./upgrade
-bash: ./upgrade: Permission denied
root@<servername>:/tmp/nagiosxi# bash upgrade
upgrade: line 9: ./init.sh: Permission denied
upgrade: line 14: ./xivar: Permission denied
upgrade: line 15: ./xivar: Permission denied
upgrade: line 16: ./xivar: Permission denied
upgrade: line 22: ./xivar: Permission denied
upgrade: line 176: upgrade: command not found
root@<servername>:/tmp/nagiosxi# bash ./upgrade
./upgrade: line 9: ./init.sh: Permission denied
./upgrade: line 14: ./xivar: Permission denied
./upgrade: line 15: ./xivar: Permission denied
./upgrade: line 16: ./xivar: Permission denied
./upgrade: line 22: ./xivar: Permission denied
./upgrade: line 176: ./upgrade: Permission denied
root@<servername>:/tmp/nagiosxi#

Re: 2024R1.3.1 Upgrade fails

Posted: Thu Nov 14, 2024 7:19 am
by tkaufman
probably because i have noexec configured on partitions. Need to figure out which for gui vs /tmp is my best guess.
removing noexec gets further but then hit next error

chown: warning: '.' should be ':': ‘root.nagios’
chown: warning: '.' should be ':': ‘root.nagios’
Archive: sourceguardian/ixed4.lin.x86-64.zip
checkdir: cannot create extraction directory: /usr/lib64/php/modules
No such file or directory

Re: 2024R1.3.1 Upgrade fails

Posted: Fri Nov 15, 2024 9:55 am
by DoubleDoubleA
Hi @tkaufman,

The chown warnings should be cleared up in the next release, and shouldn't be a blocker. It looks like permissions on that directory. Any luck?

Aaron

Re: 2024R1.3.1 Upgrade fails

Posted: Fri Nov 15, 2024 9:36 pm
by tkaufman
Didn't have time to work on it today as we had other priorities.

I am going to take another stab at on Monday

Re: 2024R1.3.1 Upgrade fails

Posted: Mon Nov 18, 2024 8:27 am
by tkaufman
very surprised this was the solution.

I just created the directories php/modules under /usr/lib64/
/usr/lib64/php/modules

The directories stopped at /usr/lib64/

Once created the update completed.

I am trying to understand why.

Now under /usr/lib64/php/modules is one file.
ixed.8.3.lin

Re: 2024R1.3.1 Upgrade fails

Posted: Mon Nov 18, 2024 10:33 am
by jsimon
My guess would be the security hardening was restricting permissions such that the active user couldn't create a directory under normal conditions. Creating the directory directly will usually solve errors like this, as the check will determine if the directory exists and use it rather than trying to create it if found. Are you running into any further issues with this upgrade?

Re: 2024R1.3.1 Upgrade fails

Posted: Wed Nov 20, 2024 8:11 am
by tkaufman
No other issues cropped up.
I probably should have muddled my way through this more on my own.
It helps to sometimes just walk it out with others.

Thanks

Re: 2024R1.3.1 Upgrade fails

Posted: Wed Nov 20, 2024 11:23 am
by jsimon
No worries! Glad you were able to get this resolved, social support is what the forums are here for :D