aspose file tools*
The moose likes Applets and the fly likes Applet can't write to the file, Permission denied Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet can Watch "Applet can New topic
Author

Applet can't write to the file, Permission denied

Mouza Ali
Ranch Hand

Joined: Oct 28, 2008
Posts: 39
Hi,

I always get back to this great forum. I have a problem with the Applet. I build a Java Applet that when a button is pressed, some java classes in eclipse will create a file and then the Applet should be able to write to this file. But it seems that there is a java.io exception, where it says: permission denied on /home/mouza/public.xml write!

I tried changing the permission of the Applet class to u=rwx and let the applet sets the file permission using java too, but also didn't work!

How can I solve this prob?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
By default, applets can't access the local file system as a security precaution. The HowCanAnAppletReadFilesOnTheLocalFileSystem page explains how to get around that.


Ping & DNS - my free Android networking tools app
Mouza Ali
Ranch Hand

Joined: Oct 28, 2008
Posts: 39
Thanks,

When I was googling, I found that I have to sign the applet, but getting arround not buying a certificate from thawt is the issue now.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
For development you can use a self-signed certificate.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet can't write to the file, Permission denied