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] [Commented] (HADOOP-12718) Incorrect error message by fs -put local dir without permission
Date Tue, 08 Nov 2016 23:54:58 GMT

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

John Zhuge commented on HADOOP-12718:
-------------------------------------

Javadoc for {{AccessDeniedException}}:
{noformat}
 * Checked exception thrown when a file system operation is denied, typically
 * due to a file permission or other access check.
 *
 * <p> This exception is not related to the {@link
 * java.security.AccessControlException AccessControlException} or {@link
 * SecurityException} thrown by access controllers or security managers when
 * access to a file is denied.
{noformat}
{{AccessDeniedException}} seems to be a better choice than {{AccessControlException}}. ACE
is widely used while ADE is only used in hadoop-aws and hadoop-yarn-common, probably because
it was introduced in 1.7. {{PathPermissionException}} is only used 3 times in tests.

> 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
>              Labels: supportability
>         Attachments: HADOOP-12718.001.patch, HADOOP-12718.002.patch, HADOOP-12718.003.patch,
HADOOP-12718.004.patch, HADOOP-12718.005.patch, HADOOP-12718.006.patch, HADOOP-12718.007.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)

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


Mime
View raw message