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 992FE2004F1 for ; Wed, 30 Aug 2017 21:09:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 97B15163690; Wed, 30 Aug 2017 19:09:07 +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 DE37F1633DC for ; Wed, 30 Aug 2017 21:09:06 +0200 (CEST) Received: (qmail 19099 invoked by uid 500); 30 Aug 2017 19:09:04 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 19088 invoked by uid 99); 30 Aug 2017 19:09:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Aug 2017 19:09:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 72AE1C1B37 for ; Wed, 30 Aug 2017 19:09:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id w31Hv8YkZJAF for ; Wed, 30 Aug 2017 19:09:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 81A5B5FCC1 for ; Wed, 30 Aug 2017 19:09:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 3FD94E09A7 for ; Wed, 30 Aug 2017 19:09:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 62CD42414F for ; Wed, 30 Aug 2017 19:09:00 +0000 (UTC) Date: Wed, 30 Aug 2017 19:09:00 +0000 (UTC) From: "Thomas Marquardt (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-14820) Fix for HDFS semantics parity for mkdirs -p MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 30 Aug 2017 19:09:07 -0000 [ https://issues.apache.org/jira/browse/HADOOP-14820?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 147860#comment-16147860 ]=20 Thomas Marquardt commented on HADOOP-14820: ------------------------------------------- Looks good. I have the following feedback: *NativeAzureFileSystem.java* *L1714* - When the file already exists and overwrite is true, both {{perfo= rmAuthCheck}} calls (L1700 and L1714) are checking permissions on the file.= The {{performAuthCheck}} on L1714 can be removed. *L2426* - The method {{getAncestor}} no longer returns the ancestor or par= ent path; instead, it returns the first path segment that exists. I recomm= end renaming it=20 {{getFirstPathSegmentThatExists}}. *L2459* - The {{ancestor}} field is actual the first path segment that exi= sts, which may be the file itself. method {{getAncestor}} no longer returns= the ancestor or parent path; instead, it returns the first path segment th= at exists. I recommend renaming it {{firstExistingPathSegment}}. . > Fix for HDFS semantics parity for mkdirs -p > -------------------------------------------- > > Key: HADOOP-14820 > URL: https://issues.apache.org/jira/browse/HADOOP-14820 > Project: Hadoop Common > Issue Type: Bug > Components: fs/azure > Reporter: Sivaguru Sankaridurg > Assignee: Sivaguru Sankaridurg > Labels: azure, fs, secure, wasb > Attachments: HADOOP-14820.001.patch, HADOOP-14820.002.patch > > > No authorization checks should be made when a user tries to create (mkdir= s -p) an existing folder hierarchy. > For example, if we start with _/home/hdiuser/prefix_ pre-created, and do = the following operations, the results should be as shown below. > {noformat} > hdiuser@hn0-0d2f67:~$ sudo chown root:root prefix > hdiuser@hn0-0d2f67:~$ sudo chmod 555 prefix > hdiuser@hn0-0d2f67:~$ ls -l > dr-xr-xr-x 3 root root 4096 Aug 29 08:25 prefix > hdiuser@hn0-0d2f67:~$ mkdir -p /home > hdiuser@hn0-0d2f67:~$ mkdir -p /home/hdiuser > hdiuser@hn0-0d2f67:~$ mkdir -p /home/hdiuser/prefix > hdiuser@hn0-0d2f67:~$ mkdir -p /home/hdiuser/prefix/1 > mkdir: cannot create directory =C3=A2/home/hdiuser/prefix/1=C3=A2: Permis= sion denied > The first three mkdirs succeed, because the ancestor is already present. = The fourth one fails because of a permission check against the (shorter) an= cestor (as compared to the path being created). > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org