[
https://issues.apache.org/jira/browse/HADOOP-8973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13597799#comment-13597799
]
Ivan Mitic commented on HADOOP-8973:
------------------------------------
OK, the issue we have is that winutils implicitly keeps all permissions for
admins/system accounts to provide the similar semantics as root on linux (this
is also needed from the scenario perspective as admins/system should be able to
access all files). This means that the test now fails when executed in the
admin context (since OS still allows admins to read/write/execute after "chmod
000").
The reason why the tests succeed on your boxes is most likely because you have
User Account Control enabled on the machine (so you are not running as an
effective admin).
Would be good to check if the test passes on Unix if executed in the context of
the root?
If we go the POSIX route, we will have the expected results ("chmod 000 admin"
will result in 000 when we "ls"). I attached a prototype patch just for
demonstration. Let's think a bit more about what is the right longer term
solution. I am actually leaning towards what you have in the patch, as that is
the absolute truth about whether checkDir succeeded or failed. The downside is
that the test now fails if executed with admin context. Would be good to know
what is the unix behavior for root for symmetry.
{quote}
Please note that I am only merging an existing Shell method from trunk to
branch-1-win. If we make it accept File on branch-1-win, then we'll set
ourselves up for merge conflicts later as we try to manage patches across the 2
branches. If we change the trunk version, then it's going to break about 15
different call sites that have nothing to do with DiskChecker, so it's not
appropriate to change the trunk version within the scope of this jira. The
safest option is to defer this change to a different jira for refactoring all
of the Shell methods like you suggested. Is there a jira for that yet?
{quote}
Makes sense. Feel free to file a Jira and I can pick it up.
> DiskChecker cannot reliably detect an inaccessible disk on Windows with NTFS
> ACLs
> ---------------------------------------------------------------------------------
>
> Key: HADOOP-8973
> URL: https://issues.apache.org/jira/browse/HADOOP-8973
> Project: Hadoop Common
> Issue Type: Bug
> Components: util
> Affects Versions: 3.0.0, 1-win
> Reporter: Chris Nauroth
> Assignee: Chris Nauroth
> Attachments: DiskChecker.proto.patch, HADOOP-8973.3.patch,
> HADOOP-8973-branch-1-win.3.patch, HADOOP-8973-branch-trunk-win.2.patch,
> HADOOP-8973-branch-trunk-win.patch
>
>
> DiskChecker.checkDir uses File.canRead, File.canWrite, and File.canExecute to
> check if a directory is inaccessible. These APIs are not reliable on Windows
> with NTFS ACLs due to a known JVM bug.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira