Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

we are using hdp 2.1.5 and I have create user in linux and create a directory in hdfs , i want to give read access to hive data base.we are using postgresql..how i can restrict this use to hive db. any one give the solution how can i set permission

avatar
New Member
 
1 ACCEPTED SOLUTION

avatar
Guru

Are you using Hive CLI or Beeline/JDBC?

1. If you are using Hive CLI, then you need to control permissions on the HDFS. If you have 750 on the data in HDFS, and the user is part of the group, then the user will have only read only access. You can also user ACLs which are part of HDP 2.1.5. You can take a look at using ACLs here

2. If you are using Beeline, and set hive.server2.enable.doAs = true, then what you did on step 1, should be enough. If it is false and you are not using Storage Based authorization, then you will need to set permissions like in SQL with grant.

View solution in original post

3 REPLIES 3

avatar

@sankar rao

Go to /apps/hive/warehouse/ directrory on HDFS and change the user/group permissions as per your requirement.

drwxr-x--- - root hdfs 0 2015-11-19 17:30 /apps/hive/warehouse/default.db

avatar
Guru

Are you using Hive CLI or Beeline/JDBC?

1. If you are using Hive CLI, then you need to control permissions on the HDFS. If you have 750 on the data in HDFS, and the user is part of the group, then the user will have only read only access. You can also user ACLs which are part of HDP 2.1.5. You can take a look at using ACLs here

2. If you are using Beeline, and set hive.server2.enable.doAs = true, then what you did on step 1, should be enough. If it is false and you are not using Storage Based authorization, then you will need to set permissions like in SQL with grant.

avatar
Expert Contributor
@sankar rao

You may want to visit these links as they are documented about the use of different Authorizations.

Hive Authorization

Storage Based Authorization in the Metastore Server