How to change /tmp in linux discovery to a different path?

Alireza Zarif 16 Reputation points
2023-01-29T14:09:21.17+00:00

Hi All,

We have a requirement to change the default /tmp path for Linux server discovery to a different path. In other words, in our Linux servers the /tmp partition is "noexec" and therefore in Linux discovery wizard, SCOM cannot execute getOSVersion.sh script and run agent package. I wanted to know if there is any way to change this default path to another path?

Regards,

Alireza

Microsoft System Center | Other
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Umang Middha 555 Reputation points
    2023-01-29T16:48:45.6833333+00:00

    Hello Alireza,

    Hope you are doing well today! To change the /tmp directory in Linux to a different path, you can follow these steps:

    1. Create a new directory that will be used as the new temporary directory. For example, mkdir /newtmp.
    2. Change the ownership and permissions of the new directory so that it is usable as a temporary directory. For example, chown root:root /newtmp and chmod 1777 /newtmp.
    3. Modify the /etc/fstab file to mount the new temporary directory as /tmp at boot time. For example, add the line /newtmp /tmp none bind 0 0 to the file.
    4. Unmount the current /tmp directory. For example, umount /tmp.
    5. Mount the new /tmp directory. For example, mount /tmp.
    6. Verify that the change was successful by checking the content of the /tmp directory. For example, ls -la /tmp.

    Please make sure I assume that you have root access to the system. Before making any changes to the /etc/fstab file, make sure to backup the file to prevent any data loss.

    Regards,

    Umang Middha

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.