[jira] [Commented] (HDFS-12674) hadoop fs -get does not throw permission denied in some cases

2017-10-18 Thread Daryn Sharp (JIRA)

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

Daryn Sharp commented on HDFS-12674:


We can't yet discount the jvm.  The problem we debugged is when cwd is 
unreadable.  Java does the right thing when an absolute path is given because 
it's just doing system calls.  Relative paths are the problem.  Per the strace 
we did, the jvm appears to be doing a fchdir to the hsperf directory during 
startup.  It now can't chdir back to the unreadable cwd at startup so relative 
paths are resolved from the hsperf dir.

> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-12674) hadoop fs -get does not throw permission denied in some cases

2017-10-17 Thread Kuhu Shukla (JIRA)

[ 
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 = 1L)
  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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org