Installing Sophos

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
john.hansen
Posts: 2
Joined: Wed Oct 18, 2023 12:07 pm

Installing Sophos

Post by john.hansen »

Hi,

I'm fairly new to using Nagios and Linux in general so this may be an easy one for some of you.

We need to install Sophos on our Linux Server running Nagios Core 4.4.7 and the installer keeps failing because "/tmp is mounted to a partition with noexec." I understand that but any command to re mount /tmp as exec does not work. Does the whole partition need to be mounted as exec?

At this point, I don't want to throw commands at it in case I screw something up.

Any help is appreciated.

Thank you
bbahn
Posts: 112
Joined: Thu Jan 12, 2023 5:42 pm

Re: Installing Sophos

Post by bbahn »

Hello john.hansen,

If /tmp is part of the root filesystem you would indeed need to remount the entire root filesystem, which is not recommended for security concerns. There are also a few other issues that it could be relating to things like filesystem-specific limitations and SELinux.

You can check the mount status with

Code: Select all

mount | grep /tmp
If this shows that /tmp is set to noexec then you will be unable to execute from there without remounting the root filesystem as exec, which you should not do.

As a workaround for this, you can try the following:
  1. create a new temporary directory from which to run the installation

    Code: Select all

    sudo mkdir /mytmp
  2. Export the TMPDIR environment variable to point to your new directory

    Code: Select all

    export TMPDIR=/mytmp
  3. Run the Sophos installer, which should now be using your temporary directory instead of /tmp
  4. Remove the temporary directory (I am not familiar with Sophos and you may need to skip this step)

    Code: Select all

    sudo rm -rf /mytmp
  5. And it's always a good idea to reset custom variables, even if you don't plan on maintaining the session for an extended period

    Code: Select all

    unset TMPDIR
April: Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
john.hansen
Posts: 2
Joined: Wed Oct 18, 2023 12:07 pm

Re: Installing Sophos

Post by john.hansen »

Thank you bbahn!!

That did the trick. Have a great week!
Post Reply