<?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 HDFS file/dir ownership to be &amp;lt;user&amp;gt;:&amp;lt;corresponding_group&amp;gt; in stead of &amp;lt;user&amp;gt;:supergroup in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305377#M222423</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In our CDP 7.1.2 cluster, default ownership of any file or directory is &amp;lt;user&amp;gt;and supergroup.&lt;/P&gt;
&lt;P&gt;One application team wants their data owner group to be their own group in stead of supergroup.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let the app team user is 'abc' and group is 'abc'.&lt;/P&gt;
&lt;P&gt;Currently owner and group for any file/dir in HDFS is abc:supergroup.&lt;/P&gt;
&lt;P&gt;They want it to be abc:abc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please suggest how to achieve this so that any new file created by abc user will have ownership as abc:abc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Banshi.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Nov 2020 13:08:57 GMT</pubDate>
    <dc:creator>banshidhar_saho</dc:creator>
    <dc:date>2020-11-04T13:08:57Z</dc:date>
    <item>
      <title>HDFS file/dir ownership to be &lt;user&gt;:&lt;corresponding_group&gt; in stead of &lt;user&gt;:supergroup</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305377#M222423</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In our CDP 7.1.2 cluster, default ownership of any file or directory is &amp;lt;user&amp;gt;and supergroup.&lt;/P&gt;
&lt;P&gt;One application team wants their data owner group to be their own group in stead of supergroup.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let the app team user is 'abc' and group is 'abc'.&lt;/P&gt;
&lt;P&gt;Currently owner and group for any file/dir in HDFS is abc:supergroup.&lt;/P&gt;
&lt;P&gt;They want it to be abc:abc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please suggest how to achieve this so that any new file created by abc user will have ownership as abc:abc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Banshi.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 13:08:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305377#M222423</guid>
      <dc:creator>banshidhar_saho</dc:creator>
      <dc:date>2020-11-04T13:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS file/dir ownership to be &lt;user&gt;:&lt;corresponding_group&gt; in stead of &lt;user&gt;:supergroup</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305388#M222425</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/28293"&gt;@banshidhar_saho&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is the expected behavior as in Hadoop there are no groups based on user name. It does not use the OS level groups, instead it inherits it from parent directory. The reason is that group resolution happens on NameNode where groups related to the user may not exist.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To fix the case in your environment, modify the owner of the parent directory. This will cause new files to use the correct group.&lt;BR /&gt;Run:--&amp;gt;hdfs dfs -chown -R username:groupname &amp;lt;PATH to DIR&amp;gt;&lt;BR /&gt;This will recursively change the owner and group for the given &amp;lt;PATH&amp;gt;. (Note: do this with hdfs user)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can further use acls' to ensure the groups you are trying have access to it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;hdfs dfs -setfacl -m default:group:&amp;lt;group-name&amp;gt;:rwx &amp;lt;Path&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Let me know if this helps&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 14:51:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305388#M222425</guid>
      <dc:creator>tusharkathpal</dc:creator>
      <dc:date>2020-11-04T14:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS file/dir ownership to be &lt;user&gt;:&lt;corresponding_group&gt; in stead of &lt;user&gt;:supergroup</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305424#M222433</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/31799"&gt;@tusharkathpal&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much. I tested it. It worked for ownership.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want 750 permission on the directory recursively.&lt;/P&gt;&lt;P&gt;However it's not reflecting in case of new file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do that? Idea is to restrict 'others' from accessing the file/dir.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Banshi.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 16:30:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305424#M222433</guid>
      <dc:creator>banshidhar_saho</dc:creator>
      <dc:date>2020-11-04T16:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS file/dir ownership to be &lt;user&gt;:&lt;corresponding_group&gt; in stead of &lt;user&gt;:supergroup</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305426#M222434</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/28293"&gt;@banshidhar_saho&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Glad to hear it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regarding permission, it depends upon acl permissions you give. In the previous comment I had updated rwx for group. You can set it something for "other"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;hdfs dfs -setfacl -m default:group:&amp;lt;group-name&amp;gt;:rwx &amp;lt;Path&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;hdfs dfs -setfacl -m default:other::- &amp;lt;path&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you try the above and update if it works.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 16:51:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305426#M222434</guid>
      <dc:creator>tusharkathpal</dc:creator>
      <dc:date>2020-11-04T16:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS file/dir ownership to be &lt;user&gt;:&lt;corresponding_group&gt; in stead of &lt;user&gt;:supergroup</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305439#M222438</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/28293"&gt;@banshidhar_saho&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you want to restrict the [others] you will need to apply POSIX permission on the file/directory look at the below examples&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below gives read and execute to [others]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ hdfs dfs -setfacl -m others::r-x /path/to/dir&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below gives read to [others]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ hdfs dfs -setfacl -m others::r-- /path/to/dir&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below gives no permissions to [others]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ hdfs dfs -setfacl -m others::--- /path/to/dir&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After the changes to validate run this snippet that should show it's set and to prove as [others]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ hdfs dfs -getfacl /path/to/dir&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to list files in the directory&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Happy hadooping&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 19:59:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305439#M222438</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2020-11-04T19:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS file/dir ownership to be &lt;user&gt;:&lt;corresponding_group&gt; in stead of &lt;user&gt;:supergroup</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305467#M222452</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/20288"&gt;@Shelton&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for sharing the exact commands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only thing that needs to change in the shared commands is - &lt;STRONG&gt;others&lt;/STRONG&gt; should be &lt;STRONG&gt;other&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Here is the command that worked for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ hdfs dfs -setfacl -m other::--- /path/to/dir&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Banshi.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 07:02:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305467#M222452</guid>
      <dc:creator>banshidhar_saho</dc:creator>
      <dc:date>2020-11-05T07:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS file/dir ownership to be &lt;user&gt;:&lt;corresponding_group&gt; in stead of &lt;user&gt;:supergroup</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305469#M222454</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/28293"&gt;@banshidhar_saho&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Surely that was I typo error I am happy that it worked for you. If you feel that helped you solve the issue you have, it would be great to accept it as an answer so the thread can be marked a solution for other members to reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Happy hadooping&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 07:16:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305469#M222454</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2020-11-05T07:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS file/dir ownership to be &lt;user&gt;:&lt;corresponding_group&gt; in stead of &lt;user&gt;:supergroup</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305475#M222458</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/28293"&gt;@banshidhar_saho&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;SPAN data-sheets-value="{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:&amp;quot;I'm happy to see you resolved your issue. Please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.&amp;quot;}" data-sheets-userformat="{&amp;quot;2&amp;quot;:15297,&amp;quot;3&amp;quot;:{&amp;quot;1&amp;quot;:0},&amp;quot;9&amp;quot;:0,&amp;quot;10&amp;quot;:1,&amp;quot;11&amp;quot;:4,&amp;quot;12&amp;quot;:0,&amp;quot;14&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0},&amp;quot;15&amp;quot;:&amp;quot;Arial&amp;quot;,&amp;quot;16&amp;quot;:11}"&gt;I'm happy to see you resolved your issue. Can you please mark the appropriate reply as the solution? It will surely make it easier for others to find the answer in the future.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 10:04:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305475#M222458</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2020-11-05T10:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS file/dir ownership to be &lt;user&gt;:&lt;corresponding_group&gt; in stead of &lt;user&gt;:supergroup</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305492#M222467</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for promptly responding and providing useful solution/direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While testing, app team reported that child dir/files are having r-x (for dir) and r--(files) for Others.&lt;/P&gt;&lt;P&gt;Looks like ACL are not getting inherited to child dir and files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you confirm if ACL should inherit to child dir and files or not?&lt;/P&gt;&lt;P&gt;Is there any other configuration that I need to check and modify?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Banshi.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 18:32:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HDFS-file-dir-ownership-to-be-lt-user-gt-lt-corresponding/m-p/305492#M222467</guid>
      <dc:creator>banshidhar_saho</dc:creator>
      <dc:date>2020-11-05T18:32:48Z</dc:date>
    </item>
  </channel>
</rss>

