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 CB3F6200CD8 for ; Wed, 19 Jul 2017 00:58:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C9EEF167BEC; Tue, 18 Jul 2017 22:58:04 +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 1AE65167BE8 for ; Wed, 19 Jul 2017 00:58:03 +0200 (CEST) Received: (qmail 90113 invoked by uid 500); 18 Jul 2017 22:58:03 -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 90096 invoked by uid 99); 18 Jul 2017 22:58:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jul 2017 22:58:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id E7F631A0AD8 for ; Tue, 18 Jul 2017 22:58:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 7cRKRKrtQVa2 for ; Tue, 18 Jul 2017 22:58:01 +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 D47F55FBE5 for ; Tue, 18 Jul 2017 22:58:00 +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 6F3B5E090E for ; Tue, 18 Jul 2017 22:58:00 +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 146B621EA4 for ; Tue, 18 Jul 2017 22:58:00 +0000 (UTC) Date: Tue, 18 Jul 2017 22:58:00 +0000 (UTC) From: "Yongjun Zhang (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-12139) HTTPFS liststatus returns incorrect pathSuffix for path of file MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 18 Jul 2017 22:58:05 -0000 [ https://issues.apache.org/jira/browse/HDFS-12139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yongjun Zhang updated HDFS-12139: --------------------------------- Attachment: HDFS-12139.002.patch > HTTPFS liststatus returns incorrect pathSuffix for path of file > --------------------------------------------------------------- > > Key: HDFS-12139 > URL: https://issues.apache.org/jira/browse/HDFS-12139 > Project: Hadoop HDFS > Issue Type: Bug > Components: httpfs > Reporter: Yongjun Zhang > Assignee: Yongjun Zhang > Attachments: HDFS-12139.001.patch, HDFS-12139.002.patch > > > Per the following logs, we can see that liststatus returns the same pathSuffix "test.txt" for /tmp/yj/yj1 and /tmp/yj/yj1/test.txt, which is wrong. The pathSuffix for the latter should be empty. > {code} > [thost ~]$ hadoop fs -copyFromLocal test.txt /tmp/yj/yj1 > [thost ~]$ curl "http://thost.x.y:14000/webhdfs/v1/tmp/yj/yj1?op=LISTSTATUS&user.name=tuser" > {"FileStatuses":{"FileStatus":[{"pathSuffix":"test.txt","type":"FILE","length":16,"owner":"tuser","group":"supergroup","permission":"644","accessTime":1500007684989,"modificationTime":1500007685286,"blockSize":134217728,"replication":3}]}} > [thost ~]$ curl "http://thost.x.y:14000/webhdfs/v1/tmp/yj/yj1/test.txt?op=LISTSTATUS&user.name=tuser" > {"FileStatuses":{"FileStatus":[{"pathSuffix":"test.txt","type":"FILE","length":16,"owner":"tuser","group":"supergroup","permission":"644","accessTime":1500007684989,"modificationTime":1500007685286,"blockSize":134217728,"replication":3}]}} > {code} > Due to this bug, the symptom of running distcp with httpfs to copy a single file /tmp/test.txt is: > {quote} > WARN org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:systest (auth:PROXY) via httpfs (auth:SIMPLE) cause:org.apache.hadoop.security.AccessControlException: Permission denied: user=systest, access=EXECUTE, inode="/tmp/test.txt":systest:supergroup:-rw-r--r-- (Ancestor /tmp/test.txt is not a directory). > {quote} > because /tmp/test.txt is treated as /tmp/test.txt/test.txt. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org