Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-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 BBA8A116B0 for ; Tue, 8 Jul 2014 16:38:09 +0000 (UTC) Received: (qmail 71694 invoked by uid 500); 8 Jul 2014 16:38:09 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 71654 invoked by uid 500); 8 Jul 2014 16:38:09 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 71640 invoked by uid 99); 8 Jul 2014 16:38:09 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jul 2014 16:38:09 +0000 Date: Tue, 8 Jul 2014 16:38:09 +0000 (UTC) From: "Chris Nauroth (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HADOOP-10507) FsShell setfacl can throw ArrayIndexOutOfBoundsException when no perm is specified 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/HADOOP-10507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Nauroth updated HADOOP-10507: ----------------------------------- Hadoop Flags: Reviewed +1 for the patch. After Jenkins runs the latest version, I'll commit it and co-credit the two of you. Thanks! > FsShell setfacl can throw ArrayIndexOutOfBoundsException when no perm is specified > ---------------------------------------------------------------------------------- > > Key: HADOOP-10507 > URL: https://issues.apache.org/jira/browse/HADOOP-10507 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Affects Versions: 3.0.0, 2.4.0 > Reporter: Stephen Chu > Assignee: sathish > Priority: Minor > Attachments: HADOOP-10507.002.patch, HDFS-6205-0001.patch, HDFS-6205.patch > > > If users don't specify the perm of an acl when using the FsShell's setfacl command, a fatal internal error ArrayIndexOutOfBoundsException will be thrown. > {code} > [root@hdfs-nfs ~]# hdfs dfs -setfacl -m user:bob: /user/hdfs/td1 > -setfacl: Fatal internal error > java.lang.ArrayIndexOutOfBoundsException: 2 > at org.apache.hadoop.fs.permission.AclEntry.parseAclEntry(AclEntry.java:285) > at org.apache.hadoop.fs.permission.AclEntry.parseAclSpec(AclEntry.java:221) > at org.apache.hadoop.fs.shell.AclCommands$SetfaclCommand.processOptions(AclCommands.java:260) > at org.apache.hadoop.fs.shell.Command.run(Command.java:154) > at org.apache.hadoop.fs.FsShell.run(FsShell.java:255) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84) > at org.apache.hadoop.fs.FsShell.main(FsShell.java:308) > [root@hdfs-nfs ~]# > {code} > An improvement would be if it returned something like this: > {code} > [root@hdfs-nfs ~]# hdfs dfs -setfacl -m user:bob:rww /user/hdfs/td1 > -setfacl: Invalid permission in : user:bob:rww > Usage: hadoop fs [generic options] -setfacl [-R] [{-b|-k} {-m|-x } ]|[--set ] > [root@hdfs-nfs ~]# > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)