title: Apache Sentry: SemanticException No valid privileges Required privileges for this query
body: <p>I have unsecured cluster (CDH 5.4) and as I want to provide an access to data to more users, I would like to turn on the Sentry, so far without Kerberos (which comes after sucessful launch of Sentry). 
  As some other people might need Impala at the moment, I decided to set it up in Hive in first stage. </p>
  
  <p>Steps I have taken:
  1) I have set up 2 users: hive and tuser</p>
  
  <p>tuser - group test
  hive - group hive, zookeeper</p>
  
  <p>group test </p>
  
  <pre><code>indexer.access, about.access, beeswax.access, filebrowser.access, hbase.write, hbase.access, help.access, impala.access, jobbrowser.access, 
  jobsub.access, metastore.write, metastore.access, oozie.dashboard_jobs_access, oozie.access, pig.access, proxy.access, rdbms.access, 
  search.access, security.impersonate, security.access, spark.access, sqoop.access, useradmin.access_view:useradmin:edit_user, useradmin.access, zookeeper.access
  </code></pre>
  
  <p>group hive</p>
  
  <pre><code>beeswax.access
  </code></pre>
  
  <p>group hive has role admin (the first one with an unlocked lock):</p>
  
  <pre><code>SERVER
  server=server1 action=ALL
  SERVER
  server=server1 action=ALL
  </code></pre>
  
  <p>group test has role neco</p>
  
  <pre><code>SERVER
  server=server1 action=ALL
  URI
  server=server1 hdfs://...:8020/user/hive/warehouse action=ALL
  DATABASE
  server=server1 db=default action=ALL
  </code></pre>
  
  <p>Moreover, the user hive is in both sets sentry.service.admin.group and sentry.service.allow.connect.</p>
  
  <p>2) I have turned on the sentry 
  - in Hive checked the Sentry Service from "none" to "Sentry"
  - in Hive Service Advanced Configuration Snippet (Safety Valve) for sentry-site.xml inserted <code>&lt;property&gt; &lt;name&gt;sentry.hive.testing.mode&lt;/name&gt;&lt;value&gt;true&lt;/value&gt;&lt;/property&gt;</code>
  + restarted Sentry </p>
  
  <p>Result:
  User hive can access anything in Hive. That's what I was expecting.</p>
  
  <p>User tuser can't access anything in Hive: <code>Error while compiling statement: FAILED: SemanticException No valid privileges Required privileges for this query: Server=server1-&gt;Db=*-&gt;Table=+-&gt;action=insert;Server=server1-&gt;Db=*-&gt;Table=+-&gt;action=select;</code></p>
  
  <p>What am I missing? </p>