Support Questions
Find answers, ask questions, and share your expertise

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

New Contributor
 
1 ACCEPTED SOLUTION

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

@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

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.

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

; ;