Hi,

just my 2 cents:
It isn't necessarily a good idea to allow any applet access to any file on the
machine since this could bring in side-effects by any other (malicious) code
that is trying to do so also. Therefore I would
 - only permit file access to special dirs and/or files.
 - set the policy per user e.g. '.java.policy' in the user's home directory.
 - think about signing the applet. This allows setting dedicated permissions per
applet and does not need any modification to be done be the user himself

Regards,
   Stefan

PS: Some links you may find useful:
     http://java.sun.com/docs/books/tutorial/security1.2/index.html
     http://java.sun.com/docs/books/tutorial/security1.2/tour1/step1.html
     http://java.sun.com/docs/books/tutorial/security1.2/tour1/step2.html
     http://java.sun.com/docs/books/tutorial/security1.2/tour1/step3.html
     http://java.sun.com/products/jdk/1.2/docs/guide/security/index.html
     http://java.sun.com/security/signExample12/

[EMAIL PROTECTED] wrote:

> Thanks a million I got it to work now.  It looks like our designated users
> will have to add that line to their file on their machines.
>
> -----Original Message-----
> From: Brian Steele [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 26, 2001 8:18 AM
> To: [EMAIL PROTECTED]
> Subject: RE: JApplet writing to local file
>
> Sounds like you're having a security problem. Try adding this line:
>
> permission java.io.FilePermission "<<ALL FILES>>", "write";
>
> to: c:\program files\javasoft\JRE\1.3\lib\security\java.policy
>
> Make sure it's verbatim.
>
> (Or you can just use PolicyTool to add it.) You can also replace "<<ALL
> FILES>>" with "c:\\temp\\test.out".
>
> If this works, you have 2 choices:
>   1) Add this line to java.policy on every PC you want to run this JApplet
>   2) Purchase a code signing certificate from Verisign or Thawte and use it
> to sign your code.
>
> -Brian
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> [EMAIL PROTECTED]
> Sent: Thursday, January 25, 2001 3:05 PM
> To: [EMAIL PROTECTED]
> Subject: JApplet writing to local file
>
> Hello,
>
> Okay here's my problem.  I want to make a japplet write locally (i.e. on the
> client's computer) but I'm unable to because the following happens:
>
> 1. My JApplet is on my workstation.  It's supposed to write to
> c:\temp\test.out (locally - i.e. my machine right now)
>
> 2. When I run my html file in appletviewer (from the command line) it works.
>
> 3. But when I simply open my html file in IE 5.5 it gives me the security
> violation window.
>
> Is there something extra I need to do because I've generated keys,
> jarsigned, converted html, and ran the policytool?
>
> Sincerely,
> Willard Thompson
> Software Engineer
> Gerber Technology, Inc.
> 860.896.6050
>
> _______________________________________________
> Swing mailing list
> [EMAIL PROTECTED]
> http://eos.dk/mailman/listinfo/swing
>
> _______________________________________________
> Swing mailing list
> [EMAIL PROTECTED]
> http://eos.dk/mailman/listinfo/swing

_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to