tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: How to run an application with different user to TC container
Date Thu, 16 May 2013 07:23:55 GMT
Andrew Hunt wrote:
> Hi
> We have a Tomcat 7.0.39 instance with several applications running within it, but all
running as the same user as the Tomcat instance.  We have a new application we are wanting
to add, but this needs to run with a different user as it has different accesses it needs
that cannot be granted to the other applications.  I have searched and read, but found anything
that looks at this level of configuration.
> 
> For example, /opt/apache-tomcat-7.0.39/bin/startup.sh is executed as 'fewperms'.  It
has an application /mydbprocessor that does stuff using a jdbc connection to a db that also
executes as fewperms.  I am now adding an application /mydeployer that needs to have sudo
rights that 'fewperms' may not have (company policy).
> 
> I would prefer not to have a separate instance of Tomcat to achieve this.  Everything
I have seen / read about so far is how to access TC as a user with a different user, not how
to run an application as a different user.
> 

Well, you have to think that it would have to be the JVM which runs Tomcat which would 
need to be able to switch to another user on-the-fly, each time it runs that specific 
application.
I do not think that this can easily be done (and there is probably nothing in Tomcat per 
se that would allow this).
So I believe that you have no choice but to run another instance under that separate user.
That is probably a good case for an Apache httpd front-end and 2 Tomcat back-ends.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message