[
https://issues.apache.org/jira/browse/HDFS-753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774004#comment-12774004
]
Allen Wittenauer edited comment on HDFS-753 at 7/29/14 7:17 PM:
----------------------------------------------------------------
I played around with this at the UNIX level. Looks like we're not following
POSIX here:
{code}
$ mkdir k
$ touch k/j
$ chown -R -w k
$ ls -al k
dr-xr-xr-x 2 aw aw 3 Nov 5 09:59 ./
drwx------ 11 aw aw 25 Nov 5 09:58 ../
-r--r--r-- 1 aw aw 0 Nov 5 09:59 j
$ rm k/j
rm: k/j: override protection 444 (yes/no)? yes
rm: k/j not removed: Permission denied
{code}
Looking at truss output, it fails with EACCESS.
was (Author: aw):
I played around with this at the UNIX level. Looks like we're not following
POSIX here:
$ mkdir k
$ touch k/j
$ chown -R -w k
$ ls -al k
dr-xr-xr-x 2 aw aw 3 Nov 5 09:59 ./
drwx------ 11 aw aw 25 Nov 5 09:58 ../
-r--r--r-- 1 aw aw 0 Nov 5 09:59 j
$ rm k/j
rm: k/j: override protection 444 (yes/no)? yes
rm: k/j not removed: Permission denied
Looking at truss output, it fails with EACCESS.
> HDFS allows delete of read only files and directories
> -----------------------------------------------------
>
> Key: HDFS-753
> URL: https://issues.apache.org/jira/browse/HDFS-753
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 0.20.1
> Reporter: Dain Sundstrom
> Assignee: Sanjay Radia
>
> Add a file or directory to HDFS, and chmod it to be read only. Then execute
> a delete and the file will be deleted.
--
This message was sent by Atlassian JIRA
(v6.2#6252)