<?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: How to manage Hive warehouse HDFS directory permission? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-manage-Hive-warehouse-HDFS-directory-permission/m-p/189272#M151365</link>
    <description>&lt;P&gt;One approach you can take is to enable Hive impersonation - set ‘hive.server2.enable.doAs=false’ in Hive Configs, which will give permissions of the Hive related HDFS folders to the ‘hive’ user, and other users wouldn’t be able to access HDFS files directly. &lt;/P&gt;&lt;P&gt;In your case, I assume you have doAs set to true, the user running the Hive query requires to have permissions defined for both HDFS and Hive in Ranger, which can be an issue if you have too many tables, as all your tables are managed under the hive/warehouse directory rather than user’s home folders, and for each table you will need to grant user permissions via HDFS policy in Ranger to the table location for the specific tables.&lt;/P&gt;&lt;P&gt;Even you have ‘doAs’ set to true, you will still be able to see the actual user in Ranger Audit logs, and it’s just the HDFS related tasks will run as the ‘hive’ user.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20489-ambari-scregionde.png" style="width: 1007px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18579i6BA4A7C7900905BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="20489-ambari-scregionde.png" alt="20489-ambari-scregionde.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 07:45:29 GMT</pubDate>
    <dc:creator>dsun</dc:creator>
    <dc:date>2019-08-18T07:45:29Z</dc:date>
  </channel>
</rss>

