hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Zhuge (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-12718) Confusing error message by fs -put local dir without permission
Date Tue, 26 Jan 2016 18:45:39 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-12718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

John Zhuge updated HADOOP-12718:
--------------------------------
    Attachment: TestFsShellCopyPermission-output.002.txt
                HADOOP-12718.002.patch

Patch 002:
* Change error message
* Upload manual unit test output

Test the patch on a cdh5.7 cluster:
{noformat}
$ ls -l
total 12
drwx------ 2 hdfs    systest 4096 Jan 26 10:29 d1
drwx------ 2 systest systest 4096 Jan 26 10:29 d2
-rw------- 1 hdfs    systest    0 Jan 26 10:29 f1
-rw------- 1 systest systest    0 Jan 26 10:29 f2
-rw-r--r-- 1 root    root     173 Jan 25 22:17 log4j.log
$ hadoop fs -put f1 /tmp
put: /home/systest/f1 (Permission denied)
$ hadoop fs -put f2 /tmp
$ hadoop fs -put d1 /tmp
put: cannot open directory file:/home/systest/d1: Permission denied
$ hadoop fs -put d2 /tmp
{noformat}

> Confusing 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
>         Attachments: HADOOP-12718.001.patch, HADOOP-12718.002.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
(v6.3.4#6332)

Mime
View raw message