tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis GALIEGUE <...@one2team.com>
Subject Re: URL "simplification"
Date Mon, 10 Oct 2011 11:59:29 GMT
On Mon, Oct 10, 2011 at 13:50, Darryl Lewis <darryl.lewis@unsw.edu.au> wrote:
> Something I've always wondered about, but never figured out, is how does
> apache run as 'apache user' or 'nobody' and work on a port below 1024, but
> Tomcat can't?
> Anyone got a simple explanation?
>

C (and C++ and many others) has seteuid() and fork(), Java doesn't.
Apache starts as root, binds to port 80 (therefore opens an fd on it),
then forks. The fd is inherited by the child, which calls seteuid().
Then the parent exits. Done.

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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


Mime
View raw message