Support Questions

Find answers, ask questions, and share your expertise

Ambari Administration Question

avatar
Expert Contributor

Few basic administration question. For a user of Ambari view, how can I do the following:

  1. Restrict their access only to a folder in HDFS
  2. I donnot want a regular user to see any other folder when they go to HDFS browser, Currently a user can view all the folders
  3. I want to restrict them to upload no more than 20gb
  4. Is it a good practice to create a file/hive/pig view instance for every user ? Can I create just one general HDFS / Hive browser and have users upload data in their folder only.

Currently I create a separate folder for every user on the host machine using HDFS and then create a user in Ambari to work within that folder.

Thanks

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Prakash Punj

Restrict their access only to a folder in HDFS

HDFS + Ranger

I donnot want a regular user to see any other folder when they go to HDFS browser, Currently a user can view all the folders

Ranger and HDFS

I want to restrict them to upload no more than 20gb

HDFS space quota

Is it a good practice to create a file/hive/pig view instance for every user ? Can I create just one general HDFS / Hive browser and have users upload data in their folder only.

No. You can create user in ambari and restrict access to user/groups "Group is good practice"

HDFS

All this can be done using https://community.hortonworks.com/content/kbentry/10235/apache-ranger-and-hdfs.html

View solution in original post

8 REPLIES 8

avatar
Master Mentor

@Prakash Punj

Restrict their access only to a folder in HDFS

HDFS + Ranger

I donnot want a regular user to see any other folder when they go to HDFS browser, Currently a user can view all the folders

Ranger and HDFS

I want to restrict them to upload no more than 20gb

HDFS space quota

Is it a good practice to create a file/hive/pig view instance for every user ? Can I create just one general HDFS / Hive browser and have users upload data in their folder only.

No. You can create user in ambari and restrict access to user/groups "Group is good practice"

HDFS

All this can be done using https://community.hortonworks.com/content/kbentry/10235/apache-ranger-and-hdfs.html

avatar
Master Mentor

@Prakash Punj

Run this

ambari-server setup --jdbc-db=postgres --jdbc-driver=/usr/share/java/postgresql-jdbc.jar

[root@phdns01 java]# ambari-server setup --jdbc-db=postgres --jdbc-driver=/usr/share/java/postgresql-jdbc.jar

Using python /usr/bin/python2

Setup ambari-server

Copying /usr/share/java/postgresql-jdbc.jar to /var/lib/ambari-server/resources

JDBC driver was successfully initialized.

Ambari Server 'setup' completed successfully.

[root@phdns01 java]#

then

http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.4/bk_Ranger_Install_Guide/content/ranger_admin...

http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.4/bk_Ranger_Install_Guide/content/ch03s01.html

Ranger install will create all the tables and user.

avatar
Expert Contributor

@Neeraj Sabharwal

Looks like I had mysql, so I am using instruction for MySql and installing Ranger. Hopefully this will go smooth...

avatar
Expert Contributor
@Neeraj Sabharwal

- I managed to install Ranger now. THanks

avatar
Master Mentor

@Prakash Punj Perfect! Please accept the answer to close the thread.

avatar
Expert Contributor

@Neeraj Sabharwal. Looks like Ranger is failing to install because of the error below. I am using MySql db. what is the root user. Looks at the screen shot..

2370-ranger.jpg

2016-02-24 03:52:25,732  [I] ---------- Creating Ranger Admin db user ---------- 
2016-02-24 03:52:25,732  [JISQL] /usr/jdk64/jdk1.8.0_60/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hdp-m.asotc/mysql -u rangeradmin -p '********' -noheader -trim -c \; -query "SELECT version();"
SQLException : SQL state: 28000 java.sql.SQLException: Access denied for user 'rangeradmin'@'hdp-m.asotc' (using password: YES) ErrorCode: 1045

avatar
Master Mentor

@Prakash Punj

If you are using MySQL then you definitely followed the below steps!

The password in my case was "rangerdba" on the UI if you key in the password you used during the setup all should be fine ,otherwise you strictly need to do the initail MySQL setup corrcetly

2373-rangermysql-setup.jpg