RE: Which user executes JSP in Tomcat?

2009-04-05 Thread raga2

Hello, 


Thanks for you reply and advice. Others asked if the JSP is correct, yes it
is, there are no errors displayed. No catch(Exception ex) { /*do nothing*/} 
kind of code either. 

The error logs for Tomcat don't show anything out of the ordinary. 

Is there anyway to tell tomcat to allow IO access to a specific folder? 

Thanks for your help everyone. 

I'm looking through the log files. 

Caldarale, Charles R wrote:
 
 From: raga2 [mailto:ragabo...@gmail.com]
 Subject: Re: Which user executes JSP in Tomcat?
 
 ps -aef tells me it's root running tomcat.
 
 That's a really bad thing to do.  You should be running Tomcat under a
 userid that does not give it the privilege to scribble anywhere in the
 file system.  If you need to access ports  1024, start Tomcat with jsvc,
 or use iptables to redirect the low ports to what's configured in Tomcat.
 
 Back to your original problem: there's no guarantee that a servlet
 container will allow webapp code to have access to any part of the file
 system, other than a spec-defined work area.  Tomcat usually does allow
 such access, unless you're running with a security manager.  If you're
 trying to use relative paths in your directory and file creation, then
 you're likely trying to write within Tomcat's directory structure, which
 is another Really Bad Thing.  Make sure that wherever you're writing is
 outside of Tomcat.
 
 (And if you're using a 3rd-party, repackaged version of Tomcat, it's
 anybody's guess where all the pieces of Tomcat are, since the repackagers
 seem to delight in scattering bits of Tomcat all over, and then tying
 things back together with a mess of symlinks - bloody ridiculous.)
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Which-user-executes-JSP-in-Tomcat--tp22865557p22893516.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Which user executes JSP in Tomcat?

2009-04-03 Thread raga2

Hello, 

Running tomcat on linux. I've written a simple JSP script to create a
directory and a file. When I run it via tomcat, the code runs fine, no
errors, but the directory nor the file get created where I specified. I have
a feeling it's some sort of permission issue. Any help is welcome, pretty
new to Tomcat. 



Thanks, 
Raga
-- 
View this message in context: 
http://www.nabble.com/Which-user-executes-JSP-in-Tomcat--tp22865557p22865557.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Which user executes JSP in Tomcat?

2009-04-03 Thread raga2

Thanks guys for the reply.

ps -aef tells me it's root running tomcat. 

I'm using tomcat 5.5 and Java 1.5.0 Update 16. 

If it's root running, then why doesn't the directories get created anywhere?
Something I'm doing wrong.




Thanks for your replies again. 

Pid-2 wrote:
 
 raga2 wrote:
 Hello, 
 
 Running tomcat on linux. I've written a simple JSP script to create a
 directory and a file. When I run it via tomcat, the code runs fine, no
 errors, but the directory nor the file get created where I specified. I
 have
 a feeling it's some sort of permission issue. Any help is welcome, pretty
 new to Tomcat. 
 
 
 
 Thanks, 
 Raga
 
 type ps -aef | grep java
 
 you should see which user tomcat is running under.
 
 p
 
 
 p.s. Usually helpful to inlcude Tomcat version, java version etc in your
 post.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Which-user-executes-JSP-in-Tomcat--tp22865557p22866000.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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