tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Crowther <peter.crowt...@melandra.com>
Subject Re: How to change effective user id on Windows
Date Fri, 08 Jan 2010 08:10:12 GMT
2010/1/8 Amit Agarwal <ami.aga@gmail.com>:
> HOw do we start TOmcat programatically using Bootstrap.start() API if we
> need to pass the user ?

You don't do it that way ;-).

By the time you start the Java virtual machine (JVM) that runs Tomcat,
that JVM must *already* be running as the user you want to use for
Tomcat.

If you're running Tomcat as a service, then commons-daemon (procrun,
renamed to tomcat6w.exe, as Chuck points out in another thread) does
exactly this.  It's a C program that wraps up the launch and
management of the JVM.  It makes sure that the JVM is launched as
whatever user is required.

If you're starting the JVM yourself, then you must make sure yourself
that whatever you use to launch Tomcat runs it as the correct user.
This may be as simple as logging in as that user and running a batch
file.

- Peter

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


Mime
View raw message