hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kuhu Shukla (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-12674) hadoop fs -get does not throw permission denied in some cases
Date Tue, 17 Oct 2017 14:51:00 GMT

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

Kuhu Shukla commented on HDFS-12674:
------------------------------------

Tried the following on my MAC:
{code}
  @Test (timeout = 10000L)
  public void testDummy() throws Exception {
    File testDir = new File("/tmp", "test");
    testDir.mkdirs();
    testDir.setReadable(false);
    testDir.setWritable(false);
    File f = new File(testDir.getAbsolutePath(), "testme.log");
    f.createNewFile();
    f.delete();
    testDir.delete();
  }
{code}

My hsperf directory did not have the file and it threw a permission denied as follows:
{code}
java.io.IOException: Permission denied

	at java.io.UnixFileSystem.createFileExclusively(Native Method)
	at java.io.File.createNewFile(File.java:1012)
	at org.apache.hadoop.yarn.server.nodemanager.containermanager.TestContainerManager.testDummy(TestContainerManager.java:363)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
{code}
This indicates it could be an HDFS specific bug and not just the JVM placing it in hsperf
directory during a get operation.

> hadoop fs -get does not throw permission denied in some cases
> -------------------------------------------------------------
>
>                 Key: HDFS-12674
>                 URL: https://issues.apache.org/jira/browse/HDFS-12674
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs
>    Affects Versions: 2.8.1
>            Reporter: Kuhu Shukla
>
> whoami : mysuperuser
> pwd : /tmp/testKuhu with no write permissions,
> {code}
> $ ls -ld .
> dr-xr-xr-x 2 mysuperuser users 4096 Oct 16 20:36 .
> $ hadoop fs -get testFile
> get: /tmp/testKuhu/testFile.COPYING (Permission denied)
> {code}
> But, when 
> whoami : mysuperuser
> pwd : /tmp/testKuhu this time with no read permissions,
> {code}
> $ ls -ld .
> d-xx-x 2 mysuperuser users 4096 Oct 16 20:36 .
> $ hadoop fs -get testFile
> $
> {code}
> passes and copies it to /tmp/hsperfdata_mysuperuser/
> The JIRA tracks this inconsistent behavior.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message