That's the proper behaviour. By default, a web application is only able to read under the context under which it was deployed. If you want to grant access to the /tmp !*be carefull*!, add the following in your catalina.policy file:

grant codeBase "file:${catalina.home}/webapps/<<your context>>/-" {
permission java.io.FilePermission "/tmp", "read";
};

-- Jeanfrancois



Simon Brooke wrote:

Hi

I've been running things under various versions of Tomcat for a long time now, but it's always been Tomcats I've compiled and installed myself. Now I'm trying to get things running with the version of Tomcat which is packaged in the Debian package 'tomcat4 4.0.3-3woody1'. The tomcat install works, and I can install my webapp OK, and tomcat serves static pages out of my webapp just fine. But when I try to access a Servlet, I get
Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server
Error) that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet items threw
exception at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935
)

... usual stuf...

root cause
java.security.AccessControlException: access denied (java.io.FilePermission
/tmp read) at
java.security.AccessControlContext.checkPermission(AccessControlContext.java(
Compiled Code))

Now if I understand what's going on there, the servlet is falling over because it can't read /tmp...

What I want to know is where this security policy is set?



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to