[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-developers] raq 550 servlet permissions



We never could get our servlet to work without generating a SocketPermission
error using the "grant codeBase..." syntax.

We finally were able to connect to our networked database from our Cobalt
through a servlet by using the following syntax:

grant	{
	permission java.net.SocketPermission "mydatabasehost:myport",
"connect, accept";
};

I hope this helps someone since everything (with the exception of one
article) we've read to date only uses the "grant codeBase" syntax in
reference to socket permissions.

Rose Z.

-----Original Message-----
From: Ursula [mailto:ursulasays@xxxxxxxxxxxx]
Sent: Saturday, March 29, 2003 10:18 PM
To: Cobalt-Developers
Subject: [cobalt-developers] raq 550 servlet permissions



Looking through the list I can see this is a common
error, but can't see any solution.

this error comes up for all servlets:

java.security.AccessControlException: access denied
(java.io.FilePermission
/home/.sites/x/sitexx/web/roster/WEB-INF/classes read)

even though this is in the tomcat.policy file:
grant codeBase "file:/home/.sites/x/sitexx/web/-" {
  permission SocketPermission "localhost:1024-",
"listen,connect,resolve";
  permission java.util.PropertyPermission "*",
"read,write";
  permission java.io.FilePermission
"/home/.sites/x/sitexx/-", "read,write,delete";
  permission java.lang.RuntimePermission
"accessClassInPackage.sun.io";
};

I can't see anything wrong with it - server has been
restarted, etc, it just keeps up with the same
permissions error

Is there a secure way to fix this? 


=====

--

Ursula


http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

_______________________________________________
cobalt-developers mailing list
cobalt-developers@xxxxxxxxxxxxxxx
http://list.cobalt.com/mailman/listinfo/cobalt-developers