0

I have an application on Tomcat 9 which is installed on Ubuntu 20.04.4 LTS. My applications has to write its temp files into to /tmp folder to work properly. After the server update (Ubuntu 16 to 20) the temp files are created inside /tmp/systemd-private-XXX-tomcat9.service-XXX/tmp.

I found on google to deactivate the private tmp folder you just need to set "privateTmp=no" or false inside the "/etc/systemd/system/multi-user.target.wants/tomcat9.service" file of the service which I did (Followed by "systemctl daemon-reload" and a "service tomcat9 (re)start")

But the folder still exists inside /tmp and my temp files are still created there and not in /tmp.

Someone some ideas why it does not work? I tried it with the apache2.service too, which lead to its private tmp folder inside /tmp to be deleted. It somehow just doesn't work for tomcat.

chaosKP
  • 41
  • 3

1 Answers1

0

Just be sure to only have privateTmp once inside the file. I had an privateTmp=yes some lines below which I didn't see somehow.

chaosKP
  • 41
  • 3