hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Lowe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-14843) FsPermission symbolic parsing failed to detect invalid argument
Date Thu, 07 Sep 2017 16:10:00 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-14843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16157146#comment-16157146

Jason Lowe commented on HADOOP-14843:

Thanks for the patch!

I believe the proposed change will break backwards compatibility.  For example, "+r" is a
valid input that should return mode 0444 and "+rwx" should return mode 0777.  The patch makes
those invalid.

After thinking about this more, I'm leaning towards closing this JIRA as Invalid.  "-rwr"
unfortunately appears to be a valid symbolic argument even for POSIX {{chmod}}.  It means
"remove read and write for all" because "-rwr" is semantically equivalent to "-rw" because
it ignores duplicate flags.  The only thing I can think of to catch this case of misunderstanding
by the user would be to treat duplicate flags as errors, but since {{chmod}} allows them I'm
reluctant to diverge from that behavior.

> FsPermission symbolic parsing failed to detect invalid argument
> ---------------------------------------------------------------
>                 Key: HADOOP-14843
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14843
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 2.7.4, 2.8.1
>            Reporter: Jason Lowe
>            Assignee: Bharat Viswanadham
>         Attachments: HADOOP-14843.patch
> A user misunderstood the syntax format for the FsPermission symbolic constructor and
passed the argument "-rwr" instead of "u=rw,g=r".  In 2.7 and earlier this was silently misinterpreted
as mode 0777 and in 2.8 it oddly became mode 0000.  In either case FsPermission should have
flagged "-rwr" as an invalid argument rather than silently misinterpreting it.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org

View raw message