Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
13
rated 0 times [  13] [ 0]  / answers: 1 / hits: 38773  / 2 Years ago, tue, december 14, 2021, 9:31:49

What will be the recommended way to ensure that a Tomcat7 instance is running as the tomcat7 (or any other) user?



I suppose that I can modify tomcat7-instance/bin/startup.sh and tomcat7-instance/bin/shutdown.sh and add 'su tomcat7' at the top.



In Tomcat6 I think it was the environment variable TOMCAT6_USER.


More From » tomcat7

 Answers
6

The most common way is to install the standard tomcat7 package with apt-get and to start it using:



sudo service tomcat7 start


The default user and group are configured in /etc/default/tomcat7 as you can see in this excerpt:



# Run Tomcat as this user ID. Not setting this or leaving it blank will use the
# default of tomcat7.
TOMCAT7_USER=tomcat7

# Run Tomcat as this group ID. Not setting this or leaving it blank will use
# the default of tomcat7.
TOMCAT7_GROUP=tomcat7

[#28545] Thursday, December 16, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
antorchestr

Total Points: 92
Total Questions: 111
Total Answers: 120

Location: Jordan
Member since Wed, Jun 17, 2020
4 Years ago
;