Configuring Debian or Ubuntu To Run a Servlet Container as Non-Root

Tomcat 6

For recent releases of Debian and Ubuntu the tomcat6 package includes a dependency on the authbind package and a default authbind configuration that allows the Tomcat 6 container to bind to ports < 1024.

To leverage the authbind configuration edit the Tomcat 6 configuration file /etc/default/tomcat6 and set

AUTHBIND=yes

See also the man page for authbind.

For example binding to port 443 one would need:

touch /etc/authbind/byport/443
chmod 0755 /etc/authbind/byport/443 
chown tomcat6:tomcat6 /etc/authbind/byport/443