<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Files created after running oozie shell action are owned by yarn user in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119231#M82009</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am running simple shell action using HUE(logged in as hdfs user in hue) -&lt;/P&gt;&lt;PRE&gt;$ cat test.sh
echo "hello" &amp;gt; /tmp/test
&lt;/PRE&gt;&lt;P&gt;The workflow is getting executed successfully. When i check the files permission and ownership -&lt;/P&gt;&lt;PRE&gt;$ ls -al /tmp/test
-rw-r--r-- 1 yarn hadoop 6 2016-05-25 14:43 /tmp/test
&lt;/PRE&gt;&lt;P&gt;The above output shows the file created via shell action has ownership as yarn.&lt;/P&gt;&lt;P&gt;How can I make oozie shell action to get the ownership to be same as the user who is running the "shell action/workflow"(in this case "hdfs")&lt;/P&gt;&lt;P&gt;So i am expecting output as shown below -&lt;/P&gt;&lt;PRE&gt;-rw-r--r-- 1 hdfs hadoop 6 2016-05-25 14:43 /tmp/test&lt;/PRE&gt;</description>
    <pubDate>Fri, 03 Jun 2016 20:18:11 GMT</pubDate>
    <dc:creator>sshimpi</dc:creator>
    <dc:date>2016-06-03T20:18:11Z</dc:date>
    <item>
      <title>Files created after running oozie shell action are owned by yarn user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119231#M82009</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am running simple shell action using HUE(logged in as hdfs user in hue) -&lt;/P&gt;&lt;PRE&gt;$ cat test.sh
echo "hello" &amp;gt; /tmp/test
&lt;/PRE&gt;&lt;P&gt;The workflow is getting executed successfully. When i check the files permission and ownership -&lt;/P&gt;&lt;PRE&gt;$ ls -al /tmp/test
-rw-r--r-- 1 yarn hadoop 6 2016-05-25 14:43 /tmp/test
&lt;/PRE&gt;&lt;P&gt;The above output shows the file created via shell action has ownership as yarn.&lt;/P&gt;&lt;P&gt;How can I make oozie shell action to get the ownership to be same as the user who is running the "shell action/workflow"(in this case "hdfs")&lt;/P&gt;&lt;P&gt;So i am expecting output as shown below -&lt;/P&gt;&lt;PRE&gt;-rw-r--r-- 1 hdfs hadoop 6 2016-05-25 14:43 /tmp/test&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Jun 2016 20:18:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119231#M82009</guid>
      <dc:creator>sshimpi</dc:creator>
      <dc:date>2016-06-03T20:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Files created after running oozie shell action are owned by yarn user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119232#M82010</link>
      <description>&lt;H4&gt; &lt;A rel="user" href="https://community.cloudera.com/users/2648/sshimpi.html" nodeid="2648"&gt;@Sagar Shimpi&lt;/A&gt;&lt;/H4&gt;&lt;P&gt;You may need to enable proxyuser. &lt;/P&gt;&lt;H4&gt;User ProxyUser Configuration&lt;/H4&gt;&lt;P&gt;Oozie supports impersonation or proxyuser functionality (identical to Hadoop proxyuser capabilities and conceptually similar to Unix 'sudo').&lt;/P&gt;&lt;P&gt;Proxyuser enables other systems that are Oozie clients to submit jobs on behalf of other users.&lt;/P&gt;&lt;P&gt;Because proxyuser is a powerful capability, Oozie provides the following restriction capabilities (similar to Hadoop):&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;Proxyuser is an explicit configuration on per proxyuser user basis.&lt;/LI&gt;&lt;LI&gt;A proxyuser user can be restricted to impersonate other users from a set of hosts.&lt;/LI&gt;&lt;LI&gt;A proxyser user can be restricted to impersonate users belonging to a set of groups.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;There are 2 configuration properties needed to set up a proxyuser:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;oozie.service.ProxyUserService.proxyuser.#USER#.hosts: hosts from where the user #USER# can impersonate other users.&lt;/LI&gt;&lt;LI&gt;oozie.service.ProxyUserService.proxyuser.#USER#.groups: groups the users being impersonated by user #USER# must belong to.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Both properties support the '*' wildcard as value. Although this is recommended only for testing/development.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2016 20:20:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119232#M82010</guid>
      <dc:creator>sunile_manjee</dc:creator>
      <dc:date>2016-06-03T20:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Files created after running oozie shell action are owned by yarn user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119233#M82011</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1486/smanjee.html" nodeid="1486"&gt;@Sunile Manjee&lt;/A&gt; &lt;/P&gt;&lt;P&gt;I tried to set the property in oozie-site.xml with #user# as hdfs but still didnt worked.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2016 21:04:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119233#M82011</guid>
      <dc:creator>sshimpi</dc:creator>
      <dc:date>2016-06-03T21:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Files created after running oozie shell action are owned by yarn user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119234#M82012</link>
      <description>&lt;P&gt;I assume restarted oozie?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2016 22:14:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119234#M82012</guid>
      <dc:creator>sunile_manjee</dc:creator>
      <dc:date>2016-06-03T22:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Files created after running oozie shell action are owned by yarn user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119235#M82013</link>
      <description>&lt;P&gt;this is a known limitation in non-secure clusters, whereby the containers are running as YARN user and not running as logged user. try setting this&lt;/P&gt;&lt;P&gt;&amp;lt;env-var&amp;gt;HADOOP_USER_NAME=${wf:user()}&amp;lt;/env-var&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2016 22:58:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119235#M82013</guid>
      <dc:creator>ibhatt</dc:creator>
      <dc:date>2016-06-03T22:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Files created after running oozie shell action are owned by yarn user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119236#M82014</link>
      <description>&lt;P&gt;Yes. I did oozie restart after doing the modifications.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 15:47:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119236#M82014</guid>
      <dc:creator>sshimpi</dc:creator>
      <dc:date>2016-06-06T15:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Files created after running oozie shell action are owned by yarn user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119237#M82015</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3601/ibhatt.html" nodeid="3601"&gt;@ibhatt&lt;/A&gt; &lt;/P&gt;&lt;P&gt;I already tried this but this didnt worked for me.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 15:47:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119237#M82015</guid>
      <dc:creator>sshimpi</dc:creator>
      <dc:date>2016-06-06T15:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Files created after running oozie shell action are owned by yarn user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119238#M82016</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/2648/sshimpi.html" nodeid="2648"&gt;@Sagar Shimpi&lt;/A&gt;&lt;P&gt;By default the shell actions are not allowed to run as another user as sudo is blocked. If you want a yarn application to run as someone other than yarn (i.e. the submitter), then you need to enable the linux container executor so that the containers are started up by the submitting user.  Also note the below setting information which also needs to be changed as well to achieve this. &lt;/P&gt;&lt;P&gt;With yarn.nodemanager.linux-container-executor.nonsecure-mode.limit-users=false (default), it runs as yarn.nodemanager.linux-container-executor.nonsecure-mode.local-user (default is 'nobody') &lt;/P&gt;&lt;P&gt;With yarn.nodemanager.linux-container-executor.nonsecure-mode.limit-users=true, it runs as the user submitting the workflow.&lt;/P&gt;&lt;P&gt; Stating that there are issues around this also where it does not work as expected because of the issues
&lt;A href="https://issues.apache.org/jira/browse/YARN-2424" target="_blank"&gt;https://issues.apache.org/jira/browse/YARN-2424&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/YARN-3462" target="_blank"&gt;https://issues.apache.org/jira/browse/YARN-3462&lt;/A&gt;&lt;/P&gt;&lt;P&gt;
The current suggestion that I can make is to add line to change the ownership of the file which was created using shell.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 23:22:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119238#M82016</guid>
      <dc:creator>quadoss</dc:creator>
      <dc:date>2016-06-07T23:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Files created after running oozie shell action are owned by yarn user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119239#M82017</link>
      <description>&lt;P&gt;Thanks for the info.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 23:37:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Files-created-after-running-oozie-shell-action-are-owned-by/m-p/119239#M82017</guid>
      <dc:creator>sshimpi</dc:creator>
      <dc:date>2016-06-07T23:37:09Z</dc:date>
    </item>
  </channel>
</rss>

