Support Questions

Find answers, ask questions, and share your expertise

Hide HDFS folder from other AMbari-User

avatar
Expert Contributor

Is there way to hide HDFS folder from everyone but the user who has access to it. Currently I have restricted one user folder from other BUT the folders are also visible. Would like to hide that if possible

1 ACCEPTED SOLUTION

avatar
Master Guru

You can set permissions to your user folder like this

hdfs dfs -chmod 700 /user/user1

and if the owner of this folder is user1, then only he can list the folder

hdfs dfs -ls /user/user1 ... works for user1 but doesn't work for other users

However, hdfs as the HDFS super-user can also list it.

View solution in original post

5 REPLIES 5

avatar

I hope this will help you:

Ex: B1,B2,B3 business units and SA( Service Account who is loading the data into HDFS)

drwxr-x--- - SA bigdata 0 2015-12-28 16:37 /db/

drwxr-x--- - SA B1 0 2015-12-28 16:37 /db/B1 Application Name/

drwxr-x--- - SA B2 0 2015-12-28 16:37 /db/B2 Application Name/

drwxr-x--- - SA B3 0 2015-12-28 16:37 /db/B3 Application Name/

bigdata(common group for all & primary group for SA)

Here using simple linux permission and groups to achieve your scenarios.

B1,B2 & B3 needs to add under bigdata group as well to get an access for /db dir

avatar
Master Guru

You can set permissions to your user folder like this

hdfs dfs -chmod 700 /user/user1

and if the owner of this folder is user1, then only he can list the folder

hdfs dfs -ls /user/user1 ... works for user1 but doesn't work for other users

However, hdfs as the HDFS super-user can also list it.

avatar
Master Mentor
@Prakash Punj

https://community.hortonworks.com/articles/10235/apache-ranger-and-hdfs.html

You can do chmod 000 on that directory and manage it using ranger

avatar
Expert Contributor

@Neeraj Sabharwal

I did that already and access is restricted but the thing is folders are viewable ( no accessible). UserA and UserB folder are restrcited but UserA can also see that a folder for UserB exists. I would like to hide that as well. All UserA needs to see is his folder in HDFS file browser.

Is there a way to do this ?

avatar
Explorer

Bump. Any recommendations to this above question?

We are also looking for such a solution.