I have existing version of tomcat7
which installed with default apt-get.
which is by default running on its own user "tomcat7
" On ubuntu 16.
Now I want tomcat9
as well running on same server with different port. I have downloaded tomcat9 manually and extracted in /opt/tomcat9.
It is running fine. But the problem is I am running tomcat9
with "sh /opt/tomcat9/startup.sh
" command. which is executing it with root
user. And the files which are uploaded earlier are in directory "/var/lib/tomcat7/webapps/images
".
And the application which running on tomcat9
is accessing same files and also writing files in same directory. But tomcat7
is not able to access those files since those are created with "root
" user.
How can I run tomcat9 with same user which tomcat7 uses i.e. 'tomcat7'