Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5C775200C09 for ; Tue, 10 Jan 2017 22:09:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 5B0A7160B2C; Tue, 10 Jan 2017 21:09:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A6052160B3D for ; Tue, 10 Jan 2017 22:08:59 +0100 (CET) Received: (qmail 71199 invoked by uid 500); 10 Jan 2017 21:08:58 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 71158 invoked by uid 99); 10 Jan 2017 21:08:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2017 21:08:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 76C9E2C2A6C for ; Tue, 10 Jan 2017 21:08:58 +0000 (UTC) Date: Tue, 10 Jan 2017 21:08:58 +0000 (UTC) From: "Wei-Chiu Chuang (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-11100) Recursively deleting file protected by sticky bit should fail MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 10 Jan 2017 21:09:00 -0000 [ https://issues.apache.org/jira/browse/HDFS-11100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wei-Chiu Chuang updated HDFS-11100: ----------------------------------- Target Version/s: 3.0.0-beta1 (was: 3.0.0-alpha2) > Recursively deleting file protected by sticky bit should fail > ------------------------------------------------------------- > > Key: HDFS-11100 > URL: https://issues.apache.org/jira/browse/HDFS-11100 > Project: Hadoop HDFS > Issue Type: Bug > Components: fs > Affects Versions: 2.6.0 > Reporter: John Zhuge > Assignee: John Zhuge > Priority: Critical > Labels: permissions > Attachments: HDFS-11100.001.patch, HDFS-11100.002.patch, HDFS-11100.003.patch, hdfs_cmds > > > Recursively deleting a directory that contains files or directories protected by sticky bit should fail but it doesn't in HDFS. In the case below, {{/tmp/test/sticky_dir/f2}} is protected by sticky bit, thus recursive deleting {{/tmp/test/sticky_dir}} should fail. > {noformat} > + hdfs dfs -ls -R /tmp/test > drwxrwxrwt - jzhuge supergroup 0 2016-11-03 18:08 /tmp/test/sticky_dir > -rwxrwxrwx 1 jzhuge supergroup 0 2016-11-03 18:08 /tmp/test/sticky_dir/f2 > + sudo -u hadoop hdfs dfs -rm -skipTrash /tmp/test/sticky_dir/f2 > rm: Permission denied by sticky bit: user=hadoop, path="/tmp/test/sticky_dir/f2":jzhuge:supergroup:-rwxrwxrwx, parent="/tmp/test/sticky_dir":jzhuge:supergroup:drwxrwxrwt > + sudo -u hadoop hdfs dfs -rm -r -skipTrash /tmp/test/sticky_dir > Deleted /tmp/test/sticky_dir > {noformat} > Centos 6.4 behavior: > {noformat} > $ ls -lR /tmp/test > /tmp/test: > total 4 > drwxrwxrwt 2 systest systest 4096 Nov 3 18:36 sbit > /tmp/test/sbit: > total 0 > -rw-rw-rw- 1 systest systest 0 Nov 2 13:45 f2 > $ sudo -u mapred rm -fr /tmp/test/sbit > rm: cannot remove `/tmp/test/sbit/f2': Operation not permitted > $ chmod -t /tmp/test/sbit > $ sudo -u mapred rm -fr /tmp/test/sbit > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org