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
.
Best Answer
The most common way is to install the standard
tomcat7
package withapt-get
and to start it using:The default user and group are configured in
/etc/default/tomcat7
as you can see in this excerpt: