Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

'show databases' fails with access-denied when user has access to some of the databases

'show databases' fails with access-denied when user has access to some of the databases

New Contributor

86381-ranger.png

I am working with Ranger the user, ranger, which has access to database default. When Execute ‘show databases;’ via beeline;the user [hive] should see ‘default’. Instead following error is shown:

Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [hive] does not have [USE] privilege on [*] (state=42000,code=40000)

When I changed the policy ' db=default; table=\*; col=\* ' to ' db=\*; table=\*; col=\*' then execute ‘show databases;’ It would be ok.

Ranger verion:1.0.0

Thanks

2 REPLIES 2

Re: 'show databases' fails with access-denied when user has access to some of the databases

@misaki mei

A user should be having proper permissions on the default database. I quite didn't understand on what was the difference between your two attempts.

Highlighted

Re: 'show databases' fails with access-denied when user has access to some of the databases

New Contributor

According to the following link :

https://cwiki.apache.org/confluence/display/RANGER/Hive+Commands+to+Ranger+Permission+Mapping

I add the resource based policy "database=default table=\* column= \* " and the permission is "select". But it failed with access-denied.

And then I modify the policy to "database=\* table=\* column= \* " , it would be ok.