On Oracle Big Data Appliance Why Can an HDFS Directory be Deleted by a User who Belongs to Group when using the Trash Option
(Doc ID 2061195.1)
Last updated on OCTOBER 11, 2016
Applies to:Big Data Appliance Integrated Software - Version 3.1.0 and later
On Oracle Big Data Appliance a directory can be deleted by user who belongs to the group.
For example, created an HDFS directory and file by 'hdfs' user in a directory owned by tuser:
bash-4.1$ hdfs dfs -put /tmp/ktemp.txt /user/tuser/rtemp
bash-4.1$ hdfs dfs -ls /user/tuser
Found 2 items
drwxr-xr-x - tuser tuser 0 2015-09-03 12:21 /user/tuser/.Trash
drwxr-xr-x - hdfs tuser 0 2015-09-03 13:23 /user/tuser/rtemp
bash-4.1$ hdfs dfs -ls /user/tuser/rtemp
Found 1 items
-rw-r--r-- 3 hdfs tuser 0 2015-09-03 13:23 /user/tuser/rtemp/ktemp.txt
Then as tuser tried to delete the directory without moving it to the .Trash directory first and this attempt failed. Then tried to move the file to the Trash (ie. equivalent to the 'hdfs dfs -rm ' command) and this operation succeeded.
$ hdfs dfs -rm -r -skipTrash rtemp
rm: Permission denied: user=tuser, access=ALL, inode="/user/tuser/rtemp":hdfs:tuser:drwxr-xr-x
-- But directory gets deleted when trash is enabled
$ hdfs dfs -rm -r rtemp
15/09/03 13:29:20 INFO fs.TrashPolicyDefault: Namenode trash configuration: Deletion interval = 1440 minutes, Emptier interval = 0 minutes.
Moved: 'hdfs://bdax42bur09-ns/user/tuser/rtemp' to trash at: hdfs://bdax42bur09-ns/user/tuser/.Trash/Current
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document