Created 11-16-2016 07:21 AM
Hi All, Is there a way to prevent a hdfs directory owner to run hadoop rm command? Like user1 is the owner of the hdfs directory /app/user1/ and got other folders and files under it. If he runs hadoop fs -rm -R (or just rm) /app/user1 it should fail. Is there a better way to prevent it?
Created 11-16-2016 07:38 PM
Please check - https://community.hortonworks.com/questions/29862/how-to-protect-hdfs-directories-from-deletion-by-m...
There is new feature of protected directories available from hadoop 2.8.0 onwards.
https://issues.apache.org/jira/browse/HDFS-8983
Hope this information helps! 🙂
Created 11-16-2016 07:38 PM
Please check - https://community.hortonworks.com/questions/29862/how-to-protect-hdfs-directories-from-deletion-by-m...
There is new feature of protected directories available from hadoop 2.8.0 onwards.
https://issues.apache.org/jira/browse/HDFS-8983
Hope this information helps! 🙂
Created 11-21-2016 03:15 AM
Thanks for your comment, we were using hdp 2.4 & hadoop 2.7.2. Not sure this feature is in there with this version.
I enabled read only permission for .Trash folder for the users. Also i was having snapshop enabled for a directory, which is not protective enough as we can able to delete the folders inside a snapshot directory. May be upgrade would be the last option to explore and use it.
Thank you much for the comments.