title: runing shell command inside java action on Oozie throws Permission denied
body: <p>I have this java code </p>
  
  <pre><code>public static void main(String... args) throws IOException, InterruptedException {
          execute("echo \"Amer\"");
      }
  
  private static void execute(String command) throws IOException, InterruptedException {
      ProcessBuilder builder = new ProcessBuilder();
      builder.command(command);
      //builder.directory(new File(System.getProperty("user.home")));
      Process process = builder.start();
  
      StreamGobbler streamGobbler =
              new StreamGobbler(process.getInputStream(), System.out::println);
      Executors.newSingleThreadExecutor().submit(streamGobbler);
      int exitCode = process.waitFor();
      assert exitCode == 0;
  }
  </code></pre>
  
  <p>and I am trying to run it on a Oozie workflow via java action 
  but when i submit the workflow, it's killed with the following exception (java.io.IOException: error=13, Permission denied)</p>
  
  <blockquote>
    <p>org.apache.oozie.action.hadoop.JavaMainException: java.io.IOException:
    Cannot run program "echo "Amer"": error=13, Permission denied     at
    org.apache.oozie.action.hadoop.JavaMain.run(JavaMain.java:60)     at
    org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:78)
      at org.apache.oozie.action.hadoop.JavaMain.main(JavaMain.java:35)   at
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)     at
    org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:231)
      at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)    at
    org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:465)   at
    org.apache.hadoop.mapred.MapTask.run(MapTask.java:349)    at
    org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:174)  at
    java.security.AccessController.doPrivileged(Native Method)    at
    javax.security.auth.Subject.doAs(Subject.java:422)    at
    org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1688)
      at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:168) Caused
    by: java.io.IOException: Cannot run program "echo "Amer"": error=13,
    Permission denied     at
    java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)  at
    ShellCommandExecutor.execute(ShellCommandExecutor.java:18)    at
    ShellCommandExecutor.main(ShellCommandExecutor.java:11)   at
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)     at
    org.apache.oozie.action.hadoop.JavaMain.run(JavaMain.java:57)     ... 15
    more Caused by: java.io.IOException: error=13, Permission denied  at
    java.lang.UNIXProcess.forkAndExec(Native Method)  at
    java.lang.UNIXProcess.(UNIXProcess.java:247)    at
    java.lang.ProcessImpl.start(ProcessImpl.java:134)     at
    java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)  ... 22 more</p>
  </blockquote>
  
  <p>any hint ?</p>