Tomcat Server -- .JSP File Write Restrictions?

L

LB

Is there a way to set up a tomcat server such that .jsp servlets
canNOT write to a file other than in a /tmp folder?

In the contrary, if I am on a shared server, can I override a setting
that only allows my .jsp / javabeans / servlets to only successfully
write to a simple text file in "/tmp" directory only. (Perhaps
something in the .htaccess file?) I'm trying to fight the dreaded
"access denied (java.io.FilePermission..." error in GoDaddy Shared
Hostings.

Note: I would normally posted this in
comp.infosystems.www.servers.unix, except that I know the Apache
server allows for file writes from both Perl and PHP... That makes me
suspect a Tomcat setup, and that pushes me to post here instead...

Anybody been here before? Many thanks in advance,
LB
 
D

Dave Miller

LB said:
Is there a way to set up a tomcat server such that .jsp servlets
canNOT write to a file other than in a /tmp folder?

In the contrary, if I am on a shared server, can I override a setting
that only allows my .jsp / javabeans / servlets to only successfully
write to a simple text file in "/tmp" directory only. (Perhaps
something in the .htaccess file?) I'm trying to fight the dreaded
"access denied (java.io.FilePermission..." error in GoDaddy Shared
Hostings.

Note: I would normally posted this in
comp.infosystems.www.servers.unix, except that I know the Apache
server allows for file writes from both Perl and PHP... That makes me
suspect a Tomcat setup, and that pushes me to post here instead...

Anybody been here before? Many thanks in advance,
LB
The permissions are per user. If Tomcat is running as tomcat and tomcat
only has write permissions to tmp, any code executed by tomcat can only
write to /tmp.

If you don't have control over your space, you need to contact GoDaddy
support to see if they'll change directory permissions for you. More
important [shameless plug warning] if you're doing more than just
development, you really should be in a private JVM environment like that
offered by our company and others.
 
A

Arne Vajhøj

LB said:
Is there a way to set up a tomcat server such that .jsp servlets
canNOT write to a file other than in a /tmp folder?

In the contrary, if I am on a shared server, can I override a setting
that only allows my .jsp / javabeans / servlets to only successfully
write to a simple text file in "/tmp" directory only. (Perhaps
something in the .htaccess file?) I'm trying to fight the dreaded
"access denied (java.io.FilePermission..." error in GoDaddy Shared
Hostings.

..htaccess is used by Apache HTTPD for access control. It has
nothing to do with Tomcat.

There are two things that limits file access:
- the access that the account Tomcat is running under has
- the limits enforces by the security manager and the security
policy file if you start Tomcat with that

On a shared server both are probably out of your control.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top