0

I want to run Tomcat 9 as a specific utility user (Ubuntu 20.04).

As recently as Tomcat 7, this could be accomplished by setting the TOMCAT7_USER and TOMCAT7_GROUP parameters in /etc/default/tomcat7/.

The file /etc/default/tomcat9 exists by default, but it did not contain user/group parameters. I tried adding the parameters TOMCAT9_USER / TOMCAT9_GROUP and TOMCAT_USER / TOMCAT_GROUP to it, restarting Tomcat each time, but the Tomcat process continues to be owned by the 'tomcat' user instead of the one I specify in this file.

I can find zero documentation on these parameters for Tomcat 9, so I have to assume that Tomcat 9 no longer recognizes these parameters. I also find zero documentation on the general problem of running Tomcat 9 as a different user.

How do I run Tomcat 9 as a different user?

Borea Deitz
  • 379
  • 4
  • 11
  • This is much more of an "operating system" question than a Tomcat question. Tomcat itself doesn't ship with anything to manage services, users, etc. for *NIX systems. The Windows service installer/runner understands how to tell its Windows Service what that stuff should be, but it's still handled by the OS itself. – Christopher Schultz May 24 '21 at 14:05
  • Does this answer your question? [Tomcat9 keep running under user tomcat9 even after change in /etc/default/tomcat9 file](https://stackoverflow.com/questions/61398602/tomcat9-keep-running-under-user-tomcat9-even-after-change-in-etc-default-tomcat) – Piotr P. Karwasz May 24 '21 at 15:43

0 Answers0