Can I change the default MID Server upgrade path from /tmp to something else?

Jeff Boltz1
Mega Guru

Hi Everyone,

I am migrating our MID servers from Windows to RHEL.

During upgrades, ServiceNow places the upgrade files under /tmp, and then tries to execute from there.

Our RHEL team has hardened the servers such that /tmp is mounted as non-executable, and there are no exceptions to the policy.  What happens is the upgrade fails, and the upgrade needs to be done manually.

Is there a way to change the upgrade path from /tmp to something else?  If not, are there any ideas for me to automate the upgrade process myself?  So the pseudo-code might be something like:

wget [ServiceNow MID Server download]
unzip
stop.sh
mv /agent /agent_OLD
cp /tmp/agent /mymid
chmod +x start.sh
chmod +x stop.sh
start.sh​

Thanks for looking.

Take care,

Jeff

 

1 ACCEPTED SOLUTION
6 REPLIES 6

Dave Mau
ServiceNow Employee
ServiceNow Employee

Just incase people find this via google, you can do this for MID servers using the the included JRE by adding the following line to the wrapper.conf.  Around like 75-ish you'll see # Java Additional Parameters

Can add:

wrapper.java.additional.2=-Djava.io.tmpdir=/home/snmid/agent/tmp

This will now use this directory instead of the /tmp.

Dave Mau
ServiceNow Employee
ServiceNow Employee

We've created a KB for this as well:

 

https://hi.service-now.com/kb_view.do?sysparm_article=KB0747569