I'm on CDH 5.15 with Sentry enabled and also ACL enabled on the HDFS directory
Below is the use case related to HDFS directory security that I want to achieve.
1. We want to create a directory say /user/test
2. Give permission like hive:hive on /user/test
3. I will manage permission on the directory with ACL's
Now I want whenever I creates a directory/file inside /user/test with any user owner should be the same as parent i.e, hive
Please let me know how I can achieve this
you can use -R option on the parent directory, so that it will inherit the permission recursively to the child folder.
hdfs dfs -chown -R hive:hive /user/test
Note: you have to be super user to change ownership of any folder in hdfs