title: Permission denied: user=etp8117, access=WRITE, inode="/user/ETP8117@ZGIE.ZTECH/shell.tmp":hdfs:hdfs:drwxr-xr-x
body: <h2>Short Description:</h2>
  
  <p>I am running a shell script that has hadoop commands. with Oozie.</p>
  
  <p>Below is the shell script I am trying to run:</p>
  
  <pre><code>#!/bin/bash 
  hdfs dfs  -mkdir /user/etp8117/testdir
  </code></pre>
  
  <h3>Wokflow.xml:</h3>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;workflow-app xmlns="uri:oozie:workflow:0.5" name="test_oozie"&gt;
    &lt;start to="shell_1"/&gt;
    &lt;action name="shell_1"&gt;
         &lt;shell xmlns="uri:oozie:shell-action:0.1"&gt;
            &lt;job-tracker&gt;${resourceManager}&lt;/job-tracker&gt;
             &lt;name-node&gt;${nameNode}&lt;/name-node&gt;
              &lt;exec&gt;test.sh&lt;/exec&gt;
          &lt;env-var&gt;HADOOP_USER_NAME=${wf:user()}&lt;/env-var&gt;
               &lt;file&gt;/user/etp8677/oozie_test/test.sh&lt;/file&gt;
     &lt;/shell&gt;
         &lt;ok to="end"/&gt;
          &lt;error to="kill"/&gt;
     &lt;/action&gt;
         &lt;kill name="kill"&gt;
          &lt;message&gt;${wf:errorMessage(wf:lastErrorNode())}&lt;/message&gt;
      &lt;/kill&gt;
       &lt;end name="end"/&gt;
   &lt;/workflow-app&gt;
  </code></pre>
  
  <h3>job.properties:</h3>
  
  <pre><code>nameNode=hdfs://CKNOS6VJFS01
  resourceManager=slmupd5hmn03.zres.ztech:8050
  queueName=default
  outputDir=hdfs://CKNOS6VJFS01/user/etp8117/
  oozie.use.system.libpath=false
  wf:user()=etp8117
  oozie.system.id=etp8117
  </code></pre>
  
  <p>oozie.wf.application.path=hdfs://CKNOS6VJFS01/user/etp8117/oozie_test/workflow.xml
      user.name=etp8117
      mapreduce.job.user.name=etp8117 </p>
  
  <p>Getting the following error when executing the oozie job:</p>
  
  <pre> 
  Error starting action [shell_1]. ErrorType [TRANSIENT], ErrorCode [JA009], Message [JA009: Permission denied: user=etp8677, access=WRITE, inode="/user/ETP8117@ZGIE.ZTECH/oozie-oozi/0000001-190123054344212-oozie-oozi-W/shell_1--shell.tmp":hdfs:hdfs:drwxr-xr-x
          at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:353)
          at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:325)
          at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:246)
          at org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer$RangerAccessControlEnforcer.checkDefaultEnforcer(RangerHdfsAuthorizer.java:428)
          at org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer$RangerAccessControlEnforcer.checkPermission(RangerHdfsAuthorizer.java:278)
          at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:190)
          at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1950)
          at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1934)
          at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkAncestorAccess(FSDirectory.java:1917)
          at org.apache.hadoop.hdfs.server.namenode.FSDirMkdirOp.mkdirs(FSDirMkdirOp.java:71)
          at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:4181)
          at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.mkdirs(NameNodeRpcServer.java:1109)
          at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.mkdirs(ClientNamenodeProtocolServerSideTranslatorPB.java:645)
          at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
          at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:640)
          at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982)
          at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2351)
          at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2347)
          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:1869)
          at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2347)
  ]
  org.apache.oozie.action.ActionExecutorException: JA009: Permission denied: user=etp8117, access=WRITE, inode="/user/ETP8117@ZGIE.ZTECH/oozie-oozi/0000001-190123054344212-oozie-oozi-W/shell_1--shell.tmp":hdfs:hdfs:drwxr-xr-x
          at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:353)
          at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:325)
          at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:246)
          at org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer$RangerAccessControlEnforcer.checkDefaultEnforcer(RangerHdfsAuthorizer.java:428)
          at org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer$RangerAccessControlEnforcer.checkPermission(RangerHdfsAuthorizer.java:278)
          at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:190)
          at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1950)
          at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1934)
          at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkAncestorAccess(FSDirectory.java:1917)
          at org.apache.hadoop.hdfs.server.namenode.FSDirMkdirOp.mkdirs(FSDirMkdirOp.java:71)
          at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:4181)
          at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.mkdirs(NameNodeRpcServer.java:1109)
          at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.mkdirs(ClientNamenodeProtocolServerSideTranslatorPB.java:645)
          at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
          at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:640)
          at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982)
          at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2351)
          at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2347)
          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:1869)
          at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2347)
          at org.apache.oozie.action.ActionExecutor.convertExceptionHelper(ActionExecutor.java:463)
          at org.apache.oozie.action.ActionExecutor.convertException(ActionExecutor.java:437)
          at org.apache.oozie.action.hadoop.JavaActionExecutor.prepareActionDir(JavaActionExecutor.java:664)
          at org.apache.oozie.action.hadoop.JavaActionExecutor.start(JavaActionExecutor.java:1380)
          at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:234)
          at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:65)
          at org.apache.oozie.command.XCommand.call(XCommand.java:287)
          at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:331)
          at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:260)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:178)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)
  Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=etp8117, access=WRITE, inode="/user/ETP8117@ZGIE.ZTECH/oozie-oozi/0000001-190123054344212-oozie-oozi-W/shell_1--shell.tmp":hdfs:hdfs:drwxr-xr-x
          at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:353)
          at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:325)
          at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:246)
          at org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer$RangerAccessControlEnforcer.checkDefaultEnforcer(RangerHdfsAuthorizer.java:428)
          at org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer$RangerAccessControlEnforcer.checkPermission(RangerHdfsAuthorizer.java:278)
          at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:190)
          at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1950)
          at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1934)
          at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkAncestorAccess(FSDirectory.java:1917)
          at org.apache.hadoop.hdfs.server.namenode.FSDirMkdirOp.mkdirs(FSDirMkdirOp.java:71)
          at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:4181)
          at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.mkdirs(NameNodeRpcServer.java:1109)
          at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.mkdirs(ClientNamenodeProtocolServerSideTranslatorPB.java:645)
          at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
          at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:640)
          at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982)
          at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2351)
          at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2347)
          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:1869)
          at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2347)
          at org.apache.hadoop.ipc.Client.getRpcResponse(Client.java:1554)
          at org.apache.hadoop.ipc.Client.call(Client.java:1498)
          at org.apache.hadoop.ipc.Client.call(Client.java:1398)
          at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:233)
          at com.sun.proxy.$Proxy31.mkdirs(Unknown Source)
          at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.mkdirs(ClientNamenodeProtocolTranslatorPB.java:610)
          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.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:291)
          at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:203)
          at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:185)
          at com.sun.proxy.$Proxy32.mkdirs(Unknown Source)
          at org.apache.hadoop.hdfs.DFSClient.primitiveMkdir(DFSClient.java:3087)
          at org.apache.hadoop.hdfs.DFSClient.mkdirs(DFSClient.java:3057)
          at org.apache.hadoop.hdfs.DistributedFileSystem$25.doCall(DistributedFileSystem.java:1181)
          at org.apache.hadoop.hdfs.DistributedFileSystem$25.doCall(DistributedFileSystem.java:1177)
          at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
          at org.apache.hadoop.hdfs.DistributedFileSystem.mkdirsInternal(DistributedFileSystem.java:1195)
          at org.apache.hadoop.hdfs.DistributedFileSystem.mkdirs(DistributedFileSystem.java:1169)
          at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:1924)
          at org.apache.oozie.action.hadoop.JavaActionExecutor.prepareActionDir(JavaActionExecutor.java:653)
          ... 11 more
  </pre>
  
  <p>OOZIE attempts by default to write to an HDFS directory that does not exist. Here is the error: org.apache.oozie.action.ActionExecutorException: FS014: Permission denied: user = etp8117, access = WRITE, inode = "/ user/ETP8117@ZGIE.ZTECH/oozie-oozi/0000026-181219054701162-oozie- oozi-W / shell_1- -fs / fs-0000026-181219054701162-oozie-oozi-W @ shell_1 @ 0 ": hdfs: hdfs: drwxr-xr-x</p>
  
  <p>It tries to create this directory: /user/ETP8117@ZGIE.ZTECH/ which is not my username but my KERBEROS token.</p>
  
  <p>Can someone help me to solve this problem please !!!</p>