Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > java.policy permission question

Reply
Thread Tools

java.policy permission question

 
 
Marcin Kasprzak
Guest
Posts: n/a
 
      03-08-2008
Hello,

I wonder if anybody can explain me how to restrict access
to filesystem for particular java aplication, this application
still should have an access to JRE properties.

I created following policy file "my.policy':
grant {
permission java.security.AllPermission;
};

and I tried to start my application like this:

java -Djava.security.manager -Djava.security.policy==my.policy myApp

but it did work myApp still could perform any filesystem I/O operation.

Is it possible somehow to revoke rights to filesystem? Something like:
grant {
permission java.io.FilePermission "<<ALL FILES>>", "NONE";
};

if "NONE" was defined....

Your input is highly welcomed.

Regards,


--
Marcin Kasprzak
 
Reply With Quote
 
 
 
 
Arne Vajhøj
Guest
Posts: n/a
 
      03-09-2008
Marcin Kasprzak wrote:
> I wonder if anybody can explain me how to restrict access
> to filesystem for particular java aplication, this application
> still should have an access to JRE properties.
>
> I created following policy file "my.policy':
> grant {
> permission java.security.AllPermission;
> };
>
> and I tried to start my application like this:
>
> java -Djava.security.manager -Djava.security.policy==my.policy myApp
>
> but it did work myApp still could perform any filesystem I/O operation.


Why should granting all permissions prevent file IO ?

Arne


 
Reply With Quote
 
 
 
 
Marcin Kasprzak
Guest
Posts: n/a
 
      03-09-2008
> Why should granting all permissions prevent file IO ?

Hello,
You right, thanks man!

Regards,


--
Marcin Kasprzak
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixed: The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {555F3418-D99E-4E51-800A-6E89CFD8B1D7} to the user NT AUTHORITY\LOCAL SERVICE SID (S-1-5-19). Skybuck Flying Windows 64bit 1 06-29-2009 06:17 PM
Deny Delete permission question sundevilkid85 MCSE 0 05-08-2006 04:21 PM
Newbie: Ajax permission'g question hemant.singh@gmail.com HTML 6 04-17-2006 05:42 PM
An ASP.NET permission question =?Utf-8?B?Y25pY2ts?= ASP .Net 1 03-22-2005 06:05 AM
NTFS permission question Bay MCSE 2 10-08-2003 05:35 AM



Advertisments