java.policy permission question

  • Thread starter Marcin Kasprzak
  • Start date
M

Marcin Kasprzak

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,
 
A

Arne Vajhøj

Marcin said:
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
 
M

Marcin Kasprzak

Why should granting all permissions prevent file IO ?

Hello,
You right, thanks man!

Regards,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top