<?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 Re: Permission denied: user=admin in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Permission-denied-user-admin/m-p/204946#M78834</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/81177/abhishes.html" nodeid="81177"&gt;@Knows NotMuch&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In order to fulfill the common requirement to initialize user accounts to run Hadoop components is the existence of a unique,&lt;CODE&gt;/user/&amp;lt;username&amp;gt; HDFS home&lt;/CODE&gt;directory. You can enable automated creation of a&lt;CODE&gt;/user/&amp;lt;username&amp;gt; HDFS home&lt;/CODE&gt;directory for each user that you create. &lt;/P&gt;&lt;P&gt;Home directory creation occurs for users created either manually using the Ambari Admin page, or through LDAP synchronization.&lt;/P&gt;&lt;P&gt;Please find the below link to know more about the new ambari.properties  property  and about the script "post-user-creation-hook.sh"&lt;/P&gt;&lt;PRE&gt;ambari.post.user.creation.hook.enabled=true&lt;/PRE&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;PRE&gt;ambari.post.user.creation.hook=/var/lib/ambari-server/resources/scripts/post-user-creation-hook.sh&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.0.0/bk_ambari-administration/content/create_user_home_directory.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.0.0/bk_ambari-administration/content/create_user_home_directory.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 May 2018 05:06:05 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2018-05-29T05:06:05Z</dc:date>
    <item>
      <title>Permission denied: user=admin</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Permission-denied-user-admin/m-p/204945#M78833</link>
      <description>&lt;P&gt;I installed my HDP Cluster without any errors. I got 100% success and I could see in Ambari that all services were started.&lt;/P&gt;&lt;P&gt;But I notice that under user there is no directory for admin. (I am logged into amber as admin/admin).&lt;/P&gt;&lt;P&gt;When I try to upload a file on HDFS I get error&lt;/P&gt;&lt;P&gt;Permission denied: user=admin, access=WRITE, inode="/foo.py":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.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.FSNamesystem.startFileInternal(FSNamesystem.java:2767)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.startFileInt(FSNamesystem.java:2702)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.startFile(FSNamesystem.java:2586)
at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.create(NameNodeRpcServer.java:736)&lt;/P&gt;&lt;P&gt;I googled and found this&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/97703/hive-write-permission-denied.html" target="_blank"&gt;https://community.hortonworks.com/questions/97703/hive-write-permission-denied.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But for me the solution above does not work because there is no directory called `/user/admin`&lt;/P&gt;&lt;P&gt;Edit: I solved the problem with these two commands&lt;/P&gt;&lt;P&gt;sudo -u hdfs hadoop fs -mkdir /user/admin&lt;/P&gt;&lt;P&gt;sudo -u hdfs hadoop fs -chown -R admin:admin /user/admin&lt;/P&gt;&lt;P&gt;After this I can work in these directories. but I am curios to know why out o the box the admin user has no permissions in my cluster (In the Hortonworks sandbox. admin user can work on all directories).&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 04:00:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Permission-denied-user-admin/m-p/204945#M78833</guid>
      <dc:creator>abhishes</dc:creator>
      <dc:date>2018-05-29T04:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Permission denied: user=admin</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Permission-denied-user-admin/m-p/204946#M78834</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/81177/abhishes.html" nodeid="81177"&gt;@Knows NotMuch&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In order to fulfill the common requirement to initialize user accounts to run Hadoop components is the existence of a unique,&lt;CODE&gt;/user/&amp;lt;username&amp;gt; HDFS home&lt;/CODE&gt;directory. You can enable automated creation of a&lt;CODE&gt;/user/&amp;lt;username&amp;gt; HDFS home&lt;/CODE&gt;directory for each user that you create. &lt;/P&gt;&lt;P&gt;Home directory creation occurs for users created either manually using the Ambari Admin page, or through LDAP synchronization.&lt;/P&gt;&lt;P&gt;Please find the below link to know more about the new ambari.properties  property  and about the script "post-user-creation-hook.sh"&lt;/P&gt;&lt;PRE&gt;ambari.post.user.creation.hook.enabled=true&lt;/PRE&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;PRE&gt;ambari.post.user.creation.hook=/var/lib/ambari-server/resources/scripts/post-user-creation-hook.sh&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.0.0/bk_ambari-administration/content/create_user_home_directory.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.0.0/bk_ambari-administration/content/create_user_home_directory.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 05:06:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Permission-denied-user-admin/m-p/204946#M78834</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-05-29T05:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Permission denied: user=admin</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Permission-denied-user-admin/m-p/204947#M78835</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/81177/abhishes.html" nodeid="81177"&gt;@Knows NotMuch&lt;/A&gt; &lt;/P&gt;&lt;P&gt;In Sandbox it works because Sandbox includes a pre configured cluster with pre configured users and their home directories.&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 05:07:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Permission-denied-user-admin/m-p/204947#M78835</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-05-29T05:07:18Z</dc:date>
    </item>
  </channel>
</rss>

