eclipsesource / J2V8

Java Bindings for V8
2.55k stars 355 forks source link

Websphere Application Server 'ALL FILES' execute permission #533

Open alisihab opened 3 years ago

alisihab commented 3 years ago

In WAS with Java 2 security enabled, the library requires execute permission on ALL FILES. Although it seems that the chmod action is not required(at least in my case) it is in place. It might be a good idea to make it optional so that the ALL FILES permission will not be required.

java.security.AccessControlException: Access denied ("java.io.FilePermission" "<<ALL FILES>>" "execute")
    at java.security.AccessController.throwACE(AccessController.java:176)
    at java.security.AccessController.checkPermissionHelper(AccessController.java:238)
    at java.security.AccessController.checkPermission(AccessController.java:385)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
    at com.ibm.ws.security.core.SecurityManager.checkPermission(SecurityManager.java:208)
    at java.lang.SecurityManager.checkExec(SecurityManager.java:812)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    at java.lang.Runtime.exec(Runtime.java:631)
    at java.lang.Runtime.exec(Runtime.java:496)
    at com.eclipsesource.v8.LibraryLoader.chmod(LibraryLoader.java:147)
    at com.eclipsesource.v8.LibraryLoader.extract(LibraryLoader.java:117)
    at com.eclipsesource.v8.LibraryLoader.loadLibrary(LibraryLoader.java:70)
    at com.eclipsesource.v8.V8.load(V8.java:71)
    at com.eclipsesource.v8.V8.createV8Runtime(V8.java:145)
nielsm5 commented 3 years ago

Seems to be happening because of an unrequired chmod? https://github.com/eclipsesource/J2V8/blob/master/src/main/java/com/eclipsesource/v8/LibraryLoader.java#L160 Why is the exception caught but not logged? Can this be removed?