0 Replies Latest reply on Feb 10, 2015 8:13 PM by Ramya M

    java.security.AccessControlException: access denied ("java.io.FilePermission" "<<ALL FILES>>" "execute")

    Ramya M Newbie

      Hi,

      I keep getting the below error when I try to deploy a SAR file. I added the security manager subsystem as follows and using standalone.xml file. The below stack trace is thrown when trying to run a process with command "ifconfig eth0" from Java code (ifconfig is under /sbin).

       

        <extensions>

           .......

              <extension module="org.wildfly.extension.security.manager"/>

          </extensions>

       

      ----------------------------------------------

       

              <subsystem xmlns="urn:jboss:domain:security-manager:1.0">

                    <deployment-permissions>

                      <minimum-set>

                         <permission class="java.security.AllPermission"/>

                      </minimum-set>

                      <maximum-set>

                        <permission class="java.security.AllPermission"/>

              </maximum-set>

                 </deployment-permissions>

              </subsystem>

          </profile>

       

      I also tried minimum-set to read as below:

       

      <permission class="java.io.FilePermission" name="/opt/jboss.8090" actions="read,write,execute"/>

      <permission class="java.io.FilePermission" name="/sbin" actions="read,write,execute"/>

      <permission class="java.lang.RuntimePermission" name="createClassLoader"/>

       

       

      ------------------------------------------

      2015-02-11 00:45:40,002 ERROR [MSC service thread 1-11][stderr] java.security.AccessControlException: access denied ("java.io.FilePermission" "<<ALL FILES>>" "execute")

      2015-02-11 00:45:40,003 ERROR [MSC service thread 1-11][stderr]         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)

      2015-02-11 00:45:40,003 ERROR [MSC service thread 1-11][stderr]         at java.security.AccessController.checkPermission(AccessController.java:559)

      2015-02-11 00:45:40,004 ERROR [MSC service thread 1-11][stderr]         at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)

      2015-02-11 00:45:40,005 ERROR [MSC service thread 1-11][stderr]         at java.lang.SecurityManager.checkExec(SecurityManager.java:799)

      2015-02-11 00:45:40,005 ERROR [MSC service thread 1-11][stderr]         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1016)

      2015-02-11 00:45:40,006 ERROR [MSC service thread 1-11][stderr]         at java.lang.Runtime.exec(Runtime.java:617)

      2015-02-11 00:45:40,007 ERROR [MSC service thread 1-11][stderr]         at java.lang.Runtime.exec(Runtime.java:450)

      2015-02-11 00:45:40,007 ERROR [MSC service thread 1-11][stderr]         at java.lang.Runtime.exec(Runtime.java:347)