<?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 Running as root is not allowed in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Running-as-root-is-not-allowed/m-p/30395#M6866</link>
    <description>&lt;P&gt;I tried to set up Impala to use YARN resource management. This requires (except from other things) to turn on Linux Container Execution (LCE) on all hots and&amp;nbsp;&lt;/P&gt;&lt;P&gt;configuring YARN to use LCE.&lt;/P&gt;&lt;P&gt;The problem is, that when I tried to run a Spark job under root account YARN refused to do ths. First, it was an error message about nobody user.&lt;/P&gt;&lt;P&gt;Since YARN is by default configured to use this user, I changed the yarn.nodemanager.linux-container-executor.nonsecure-mode.local.user to&amp;nbsp;&lt;STRONG&gt;false&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;in safety valve for yarn-site.xml.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the documentation this should enforce that every action in the container is executed under the user who submitted the job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to add root to the whitelist of allowed users in YARN (allowed.system.users) and setting min.user.id to 1, but nothng helped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yarn still is refusing to start a job under root.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 09:36:39 GMT</pubDate>
    <dc:creator>Tomas79</dc:creator>
    <dc:date>2022-09-16T09:36:39Z</dc:date>
    <item>
      <title>Running as root is not allowed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Running-as-root-is-not-allowed/m-p/30395#M6866</link>
      <description>&lt;P&gt;I tried to set up Impala to use YARN resource management. This requires (except from other things) to turn on Linux Container Execution (LCE) on all hots and&amp;nbsp;&lt;/P&gt;&lt;P&gt;configuring YARN to use LCE.&lt;/P&gt;&lt;P&gt;The problem is, that when I tried to run a Spark job under root account YARN refused to do ths. First, it was an error message about nobody user.&lt;/P&gt;&lt;P&gt;Since YARN is by default configured to use this user, I changed the yarn.nodemanager.linux-container-executor.nonsecure-mode.local.user to&amp;nbsp;&lt;STRONG&gt;false&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;in safety valve for yarn-site.xml.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the documentation this should enforce that every action in the container is executed under the user who submitted the job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to add root to the whitelist of allowed users in YARN (allowed.system.users) and setting min.user.id to 1, but nothng helped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yarn still is refusing to start a job under root.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:36:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Running-as-root-is-not-allowed/m-p/30395#M6866</guid>
      <dc:creator>Tomas79</dc:creator>
      <dc:date>2022-09-16T09:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Running as root is not allowed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Running-as-root-is-not-allowed/m-p/30412#M6867</link>
      <description>Hi Tomas,&lt;BR /&gt;&lt;BR /&gt;Root has uid=0, that's why.&lt;BR /&gt;It is highly recommended not to use root to run jobs for various reasons: security, stability, portability etc.&lt;BR /&gt;The best solution is to run container as standard user, which needs certain level of permissions. Here is example with ubuntu:&lt;BR /&gt;&lt;A href="https://docs.docker.com/installation/ubuntulinux/#giving-non-root-access" target="_blank"&gt;https://docs.docker.com/installation/ubuntulinux/#giving-non-root-access&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please let us know if it worked.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Pawel Niemiec</description>
      <pubDate>Mon, 03 Aug 2015 20:57:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Running-as-root-is-not-allowed/m-p/30412#M6867</guid>
      <dc:creator>pawelniemiec</dc:creator>
      <dc:date>2015-08-03T20:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Running as root is not allowed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Running-as-root-is-not-allowed/m-p/40238#M6868</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yarn makes three checks ( &lt;A href="https://svn.apache.org/repos/asf/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/container-executor.c" target="_self"&gt;source code&lt;/A&gt; )&amp;nbsp; :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;compare the name of the user with string root with string compare (strcmp(user, "root") == 0&lt;/LI&gt;&lt;LI&gt;verify if your user is white listed&amp;nbsp;&amp;nbsp; ( !is_whitelisted(user)&lt;/LI&gt;&lt;LI&gt;check the uid of the user with minuid.&amp;nbsp; ( user_info-&amp;gt;pw_uid &amp;lt; min_uid&amp;nbsp; )&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;For now the only workaround I found is to create a new user with UID and GID equal to 0 and insert the name of the user in white listed and set min user id to 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is an important motivation to use root: if you need to use distcp on a target location that is an NFS filesystem or a sharable filesystem mounted local on the datanode/workernode to make a backup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Infact in that case, if you run a job with a normal user, it's not possible to change the owner of the file, so the distcp backup will fails.&amp;nbsp; Obviously if you run as root it will fail too for the hard coded control.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 14:56:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Running-as-root-is-not-allowed/m-p/40238#M6868</guid>
      <dc:creator>matdba</dc:creator>
      <dc:date>2016-04-27T14:56:03Z</dc:date>
    </item>
  </channel>
</rss>

