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 3E8A2200B89 for ; Tue, 6 Sep 2016 20:22:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3D2EC160AA9; Tue, 6 Sep 2016 18:22:24 +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 85D2C160ACB for ; Tue, 6 Sep 2016 20:22:23 +0200 (CEST) Received: (qmail 56724 invoked by uid 500); 6 Sep 2016 18:22:22 -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 56599 invoked by uid 99); 6 Sep 2016 18:22:22 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2016 18:22:22 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2E9BE2C1B91 for ; Tue, 6 Sep 2016 18:22:22 +0000 (UTC) Date: Tue, 6 Sep 2016 18:22:22 +0000 (UTC) From: "John Zhuge (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-6962) ACL inheritance conflicts with umaskmode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 06 Sep 2016 18:22:24 -0000 [ https://issues.apache.org/jira/browse/HDFS-6962?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D15468= 117#comment-15468117 ]=20 John Zhuge commented on HDFS-6962: ---------------------------------- Thank you [~eddyxu] and [~cnauroth] for the great reviews and commit, [~Ale= xandre LINTE] for reporting the issue. > ACL inheritance conflicts with umaskmode > ---------------------------------------- > > Key: HDFS-6962 > URL: https://issues.apache.org/jira/browse/HDFS-6962 > Project: Hadoop HDFS > Issue Type: Bug > Components: security > Affects Versions: 2.4.1 > Environment: CentOS release 6.5 (Final) > Reporter: LINTE > Assignee: John Zhuge > Priority: Critical > Labels: hadoop, security > Fix For: 3.0.0-alpha2 > > Attachments: HDFS-6962.001.patch, HDFS-6962.002.patch, HDFS-6962.= 003.patch, HDFS-6962.004.patch, HDFS-6962.005.patch, HDFS-6962.006.patch, H= DFS-6962.007.patch, HDFS-6962.008.patch, HDFS-6962.009.patch, HDFS-6962.010= .patch, HDFS-6962.1.patch, disabled_new_client.log, disabled_old_client.log= , enabled_new_client.log, enabled_old_client.log, run_compat_tests, run_uni= t_tests, test_plan.md > > > In hdfs-site.xml=20 > > dfs.umaskmode > 027 > > 1/ Create a directory as superuser > bash# hdfs dfs -mkdir /tmp/ACLS > 2/ set default ACLs on this directory rwx access for group readwrite and = user toto > bash# hdfs dfs -setfacl -m default:group:readwrite:rwx /tmp/ACLS > bash# hdfs dfs -setfacl -m default:user:toto:rwx /tmp/ACLS > 3/ check ACLs /tmp/ACLS/ > bash# hdfs dfs -getfacl /tmp/ACLS/ > # file: /tmp/ACLS > # owner: hdfs > # group: hadoop > user::rwx > group::r-x > other::--- > default:user::rwx > default:user:toto:rwx > default:group::r-x > default:group:readwrite:rwx > default:mask::rwx > default:other::--- > user::rwx | group::r-x | other::--- matches with the umaskmode defined in= hdfs-site.xml, everything ok ! > default:group:readwrite:rwx allow readwrite group with rwx access for inh= =C3=A9ritance. > default:user:toto:rwx allow toto user with rwx access for inh=C3=A9ritanc= e. > default:mask::rwx inh=C3=A9ritance mask is rwx, so no mask > 4/ Create a subdir to test inheritance of ACL > bash# hdfs dfs -mkdir /tmp/ACLS/hdfs > 5/ check ACLs /tmp/ACLS/hdfs > bash# hdfs dfs -getfacl /tmp/ACLS/hdfs > # file: /tmp/ACLS/hdfs > # owner: hdfs > # group: hadoop > user::rwx > user:toto:rwx #effective:r-x > group::r-x > group:readwrite:rwx #effective:r-x > mask::r-x > other::--- > default:user::rwx > default:user:toto:rwx > default:group::r-x > default:group:readwrite:rwx > default:mask::rwx > default:other::--- > Here we can see that the readwrite group has rwx ACL bu only r-x is effec= tive because the mask is r-x (mask::r-x) in spite of default mask for inher= itance is set to default:mask::rwx on /tmp/ACLS/ > 6/ Modifiy hdfs-site.xml et restart namenode > > dfs.umaskmode > 010 > > 7/ Create a subdir to test inheritance of ACL with new parameter umaskmod= e > bash# hdfs dfs -mkdir /tmp/ACLS/hdfs2 > 8/ Check ACL on /tmp/ACLS/hdfs2 > bash# hdfs dfs -getfacl /tmp/ACLS/hdfs2 > # file: /tmp/ACLS/hdfs2 > # owner: hdfs > # group: hadoop > user::rwx > user:toto:rwx #effective:rw- > group::r-x #effective:r-- > group:readwrite:rwx #effective:rw- > mask::rw- > other::--- > default:user::rwx > default:user:toto:rwx > default:group::r-x > default:group:readwrite:rwx > default:mask::rwx > default:other::--- > So HDFS masks the ACL value (user, group and other -- exepted the POSIX = owner -- ) with the group mask of dfs.umaskmode properties when creating di= rectory with inherited ACL. -- 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