aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes acces denied Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "acces denied" Watch "acces denied" New topic
Author

acces denied

Alexandre Cuvillier
Greenhorn

Joined: Feb 24, 2003
Posts: 3
Hi,
I have a sun cobalt linux server.
With Apache tomcat installed.
The jsp pages work properly, the problem is when I call a classe.
java.security.AccessControlException: access denied (java.io.FilePermission /home/.sites/143/site2/web/WEB-INF/classes read)
Here is my tmcat policy, I tried to grant for everything but there is nothing to do
// Permissions for tomcat.
// javac
grant codeBase "file:${java.home}/../lib/-" {
permission java.security.AllPermission;
};
grant {
// Allow everything for now
permission java.security.AllPermission;
};
// Tomcat gets all permissions
grant codeBase "file:${tomcat.home}/lib/-" {
permission java.security.AllPermission;
};
grant codeBase "file:${tomcat.home}/classes/-" {
permission java.security.AllPermission;
};
// Example webapp policy
// By default Tomcat grants read access on webapp dir and read of the
// line.separator, path.separator, and file.separator PropertyPermissions.
// Any permissions you grant here are in addition to the default.
// Disabled for Cobalt Linux
// grant codeBase "file:${tomcat.home}/webapps/matchcote" {
// Allow the example web application to read all java properties
// permission java.util.PropertyPermission "*", "read,write,delete";
// };
grant
{ permission java.util.PropertyPermission "*", "read";
}
grant {
// OS Specific properties to allow read access
permission java.util.PropertyPermission "os.name", "read";
permission java.util.PropertyPermission "os.version", "read";
permission java.util.PropertyPermission "os.arch", "read";

// JVM properties to allow read access
permission java.util.PropertyPermission "java.version", "read";
permission java.util.PropertyPermission "java.vendor", "read";
permission java.util.PropertyPermission "java.vendor.url", "read";
permission java.util.PropertyPermission "java.class.version", "read";
permission java.util.PropertyPermission "java.specification.version", "read";
permission java.util.PropertyPermission "java.specification.vendor", "read";
permission java.util.PropertyPermission "java.specification.name", "read";
permission java.util.PropertyPermission "java.vm.specification.version", "read";
permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
permission java.util.PropertyPermission "java.vm.specification.name", "read";
permission java.util.PropertyPermission "java.vm.version", "read";
permission java.util.PropertyPermission "java.vm.vendor", "read";
permission java.util.PropertyPermission "java.vm.name", "read";

permission java.util.PropertyPermission "line.separator", "read";
permission java.util.PropertyPermission "file.separator", "read";
};
grant codeBase "file:/home/sites/www.matchcote.com/web/-" {
permission java.net.SocketPermission "localhost:1024-", "listen,connect,resolve";
permission java.util.PropertyPermission "*", "read,write";
permission java.lang.RuntimePermission "accessClassInPackage.sun.io";
};
grant codeBase "file:/home/.sites/143/site2/web/-" {
permission SocketPermission "localhost:1024-", "listen,connect,resolve";
permission java.util.PropertyPermission "*", "read,write";
permission java.io.FilePermission "/home/.sites/143/site2/-", "read,write,delete";
permission java.io.FilePermission "/home/.sites/143/site2/web/WEB-INF/classes/*", "read,write";
permission java.lang.RuntimePermission "accessClassInPackage.sun.io";
};
Brian Blignaut
Ranch Hand

Joined: Jan 08, 2003
Posts: 61
Do you get this when running an applet?
Alexandre Cuvillier
Greenhorn

Joined: Feb 24, 2003
Posts: 3
no it's not an applet.
it's a bean
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937
Alexandre,
Please post to appropriate forum, -- this one is for discussing the developer certification.
Eugene.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Closing this thread and moving it to the appropiate forum, JSP.
I take that back. I am just going to close this thread because it is a duplicate post already posted in Apache/Tomcat.
Please refrain from cross posting.
Mark
[ February 24, 2003: Message edited by: Mark Spritzler ]

Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: acces denied