Support Questions

Find answers, ask questions, and share your expertise

oozie how to change owner from yarn to user

avatar
Contributor

hello,

I use an oozie shell action to create a file aaaknowledge.txt in /tmp and then copy it to HDFS as per script.sh:


echo "`date -u`" >> /tmp/aaaknowledge.txt

hadoop fs -copyFromLocal /tmp/aaaknowledge.txt hdfs://sandbox.hortonworks.com:8020/user/maria_dev/oozie/log

However the created directory has yarn as owner, thus the user cannot access it.

How can I setup user rights for oozie actions?

1 REPLY 1

avatar
Contributor

use

<env-var>HADOOP_USER_NAME=${wf:user()}</env-var>

in the workflow.xml

I found the solution here:

https://community.hortonworks.com/content/kbentry/26593/permission-denied-useryarn-accesswrite-oozie...