tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ognjen Blagojevic <ogn...@etf.bg.ac.rs>
Subject Re: Reading and writing files outside tomcat directory
Date Wed, 04 Nov 2009 09:59:32 GMT
noobie45 wrote:
> Thank you so much.
> 
> I am absolutely new to Tomcat on Linux.
> 
> I need to figure out what you mean by "user-id under which Tomcat runs".

Every process on Linux is ran by a certain user. With command "ps -ef", 
you can list all the processes and users that run them (first column 
from left).

You can easily identify Tomcat process by recognizing Java executable, 
something like:

tomcat   28710     1  5 10:43 ?        00:00:17 
/usr/java/default/bin/java 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties 
-Dorg.apache.el.parser.COERCE_TO_ZERO=false -XX:MaxPermSize=300m 
-Xms300m -Xmx400m -Djava.endorsed.dirs=/usr/local/tomcat/endorsed 
-classpath :/usr/local/tomcat/bin/bootstrap.jar 
-Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat 
-Djava.io.tmpdir=/usr/local/tomcat/temp 
org.apache.catalina.startup.Bootstrap start


Here you can see that Tomcat server is started as Java application 
packed in bootstrap.jar file, invoked by default JVM 
(/usr/java/default/bin/java), and ran by user "tomcat". On some system 
the user can be "root" or something else.

Now, to go back to the original question: if the user that is running 
Tomcat server have privileges to read or write to any directory on the 
file system, so will the tomcat web application. (At least if the 
security manager is turned off which is default setting.)

Regards,
Ognjen

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


Mime
View raw message