Accepted answer

i don't know how eclipse runs tomcat, but it will need for sure to run an executable. so, you can chown that executable to the user tomcat and then setuid the executable. for example:

chown tomcat:tomcat /path/to/bin/tomcat
chmod +s /path/to/bin/tomcat

with the setuid bit any executable is ran as the user who owns it.

i didn't test it, but it should work fine.

Related Query

More Query from same tag