Posted By:
Michael_Duffy
Posted On:
Thursday, May 9, 2002 01:28 PM
I'm writing an RMI application that has to use Runtime.exec to invoke a script. I keep getting a security exception, saying I don't have execute permission for the script. I've written a policy file - RMI requires it. I wrote a java.io.FilePermission entry that gives execute permission to all the files in the directory where the script lives, like this: permission java.io.FilePermission "${user.dir}${/}-", "read, write, execute, delete"; I still get the security exception. If I modify the policy file to give < > read and execute permission, it works perfectly. I'd rather not do that if I can
More>>
I'm writing an RMI application that has to use Runtime.exec to invoke a script. I keep getting a security exception, saying I don't have execute permission for the script.
I've written a policy file - RMI requires it. I wrote a java.io.FilePermission entry that gives execute permission to all the files in the directory where the script lives, like this:
permission java.io.FilePermission "${user.dir}${/}-", "read, write, execute, delete";
I still get the security exception.
If I modify the policy file to give
<
> read and execute permission, it works perfectly. I'd rather not do that if I can help it.
Is this a bug or pilot error? I'm using JDK 1.4.0-rc running on Windows 2000 version 5.0 build 2195 service pack 2. I've checked the bug database, but I didn't see anything that fits.
I've boiled my problem down to a simple command line app that also exhibits the same behavior. There doesn't appear to be a good way to attach it to this note, though. It takes up 5KB in a .zip file.
Any ideas? Thanks - MOD
<<Less