tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: How can I run one particular webapp as a different user?
Date Tue, 10 Jun 2008 20:41:53 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Arun,

Sudhir, Arun wrote:
| Do you mean to say that every webapp is a separate thread?

No.

| So
| the userid for the Runtime.exec() would be the id of the user starting
| the servlet conatiner (by running startup.sh)?

Yes. Child processes inherit the euid of the parent process.

| Is there a place like a
| catalina.policy or something where I can say "hey tomcat, this is userid
| with which you should runall Runtime.exec() calls!".  :) (Too much to
| ask ?? )

Java does not allow you to do this, so I would imagine that Tomcat can't
either.

On UNIX systems, running a process as another user is as simple as using
the "su" command (or "sudo", if you have that set up). Try looking at
the man pages for those two commands and you should be able to figure
out how to run one command as another user.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhO5xEACgkQ9CaO5/Lv0PARsgCfeN86bIudAh3jbB15itWD8iww
3MAAmQFyVY0hjMKgzxsY7Ue8h9cB2yjI
=YnF6
-----END PGP SIGNATURE-----

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


Mime
View raw message