<?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: Setting a permission in hive databases but it does not work in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Setting-a-permission-in-hive-databases-but-it-does-not-work/m-p/155914#M118336</link>
    <description>&lt;P&gt;You will need to set the following in the hive-site.xml and restart the HiveServer2.&lt;/P&gt;&lt;PRE&gt;hive.server2.enable.doAs = false
hive.security.authorization.manager = org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory
hive.security.authenticator.manager = org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator
hive.users.in.admin.role = hive
hive.security.authorization.enabled = true&lt;/PRE&gt;&lt;P&gt;Note that the permissions are enforced in HS2 session only. So, if hive user created some table and did not explicitly give permissions to user mxl then mxl wouldn't be able to operate on it. Example&lt;/P&gt;&lt;PRE&gt;- Login as user hive and in beeline session run the following:
create table test (key string, val int);

- Now login as user mxl and in beeline session run the following:
insert into table test select * from foo;
You will see an error like "Permission denied. name=mxl does not have following privileges. INSERT."

- To explicitly provide permissions, login as user hive in beeline session and run:
grant insert on test to user mxl;&lt;/PRE&gt;&lt;P&gt;Hope this is what you were looking for, not very sure reading your question.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Mar 2017 23:03:47 GMT</pubDate>
    <dc:creator>deepesh1</dc:creator>
    <dc:date>2017-03-14T23:03:47Z</dc:date>
  </channel>
</rss>

