Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E350310A12 for ; Tue, 10 Dec 2013 04:38:28 +0000 (UTC) Received: (qmail 78373 invoked by uid 500); 10 Dec 2013 04:38:17 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 78329 invoked by uid 500); 10 Dec 2013 04:38:15 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 78308 invoked by uid 99); 10 Dec 2013 04:38:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Dec 2013 04:38:13 +0000 Date: Tue, 10 Dec 2013 04:38:13 +0000 (UTC) From: "Yongjun Zhang (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-4983) Numeric usernames do not work with WebHDFS FS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-4983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13843932#comment-13843932 ] Yongjun Zhang commented on HDFS-4983: ------------------------------------- Thanks a lot Andrew! > Numeric usernames do not work with WebHDFS FS > --------------------------------------------- > > Key: HDFS-4983 > URL: https://issues.apache.org/jira/browse/HDFS-4983 > Project: Hadoop HDFS > Issue Type: Improvement > Components: webhdfs > Affects Versions: 2.0.0-alpha > Reporter: Harsh J > Assignee: Yongjun Zhang > Labels: patch > Fix For: 2.3.0 > > Attachments: HDFS-4983-branch2.3.001.patch, HDFS-4983.001.patch, HDFS-4983.002.patch, HDFS-4983.003.patch, HDFS-4983.004.patch, HDFS-4983.005.patch, HDFS-4983.006.patch, HDFS-4983.006.patch > > > Per the file hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/resources/UserParam.java, the DOMAIN pattern is set to: {{^[A-Za-z_][A-Za-z0-9._-]*[$]?$}}. > Given this, using a username such as "123" seems to fail for some reason (tried on insecure setup): > {code} > [123@host-1 ~]$ whoami > 123 > [123@host-1 ~]$ hadoop fs -fs webhdfs://host-2.domain.com -ls / > -ls: Invalid value: "123" does not belong to the domain ^[A-Za-z_][A-Za-z0-9._-]*[$]?$ > Usage: hadoop fs [generic options] -ls [-d] [-h] [-R] [ ...] > {code} -- This message was sent by Atlassian JIRA (v6.1.4#6159)