hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12718) Incorrect error message by fs -put local dir without permission
Date Mon, 16 May 2016 13:27:12 GMT

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

Steve Loughran commented on HADOOP-12718:

# There's a {{PathAccessDeniedException}} in Hadoop, not sure if its the one to use or not...my
IDE isn't showing much (any?) use of that exception. Given it's obscurity, I'd stick with
what the patch has: the java.nio one. (Looking at HADOOP-13130 I See that I'd just picked
it up...I'll go to {{java.nio.AccessDeniedException}} there.

I think to tighten the specification properly you're going to have follow the full process
# look at what HDFS does. write a test for this if needed
# Look at what the other filesystems do, such as azure, webHDFS. Ignore S3A, I'm setting that
up right now.
# If any of the others return null, they'll need to be fixed.
# then we should consider having a permissions test. This is trickier than it looks, as permissions
is where things vary, and setting them can be hard to do in a cross-platform, cross-FS way.

Finally, I'd make the FS requirement, {{throws AccessDeniedException, IOException}} so that
it is considered acceptable to raise other exceptions. This will avoid having to fix every
other FS so that it is consistent with this tightening of the spec.

> Incorrect error message by fs -put local dir without permission
> ---------------------------------------------------------------
>                 Key: HADOOP-12718
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12718
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: John Zhuge
>            Assignee: John Zhuge
>            Priority: Minor
>              Labels: supportability
>             Fix For: 2.8.0
>         Attachments: HADOOP-12718.001.patch, HADOOP-12718.002.patch, HADOOP-12718.003.patch,
TestFsShellCopyPermission-output.001.txt, TestFsShellCopyPermission-output.002.txt, TestFsShellCopyPermission.001.patch
> When the user doesn't have access permission to the local directory, the "hadoop fs -put"
command prints a confusing error message "No such file or directory".
> {noformat}
> $ whoami
> systest
> $ cd /home/systest
> $ ls -ld .
> drwx------. 4 systest systest 4096 Jan 13 14:21 .
> $ mkdir d1
> $ sudo -u hdfs hadoop fs -put d1 /tmp
> put: `d1': No such file or directory
> {noformat}
> It will be more informative if the message is:
> {noformat}
> put: d1 (Permission denied)
> {noformat}
> If the source is a local file, the error message is ok:
> {noformat}
> put: f1 (Permission denied)
> {noformat}

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