You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Bikas Saha (JIRA)" <ji...@apache.org> on 2012/05/30 20:30:23 UTC

[jira] [Commented] (HADOOP-8235) Support file permissions and ownership on Windows for RawLocalFileSystem

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

Bikas Saha commented on HADOOP-8235:
------------------------------------

{code}
+        // If on windows domain, token format is DOMAIN\\user and we want to
+        // extract only the user name
+        if (Shell.WINDOWS) {
+          int i = owner.indexOf('\
{code}
Why not remove the domain in the output of winutils itself. Does any other part of the code use the domain information?
Do you see any issues in user names clashing when the domain is stripped off? If yes, then whats the solution. At least a comment would help.

{code}
+        // FIXME: Group names could have spaces on Windows
{code}
Is there a solution in mind? What is the jira tracking this?

{code}
         fs.delete(systemDir, true);
         if (FileSystem.mkdirs(fs, systemDir, 
             new FsPermission(SYSTEM_DIR_PERMISSION))) {
+          if (Shell.WINDOWS) {
+            // Explicitly set ownership on Windows, as in some scenarios
+            // Administrators group would end up being the owner what is
+            // currently not supported by the Hadoop security model.
+            fs.setOwner(systemDir, getMROwner().getShortUserName(), null);
+          }
           break;
         }
{code}
Any issues in doing setOwner regardless of OS? That would make sure expected ownership is always set
Same for the other places this has been done.


                
> Support file permissions and ownership on Windows for RawLocalFileSystem
> ------------------------------------------------------------------------
>
>                 Key: HADOOP-8235
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8235
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: native
>    Affects Versions: 1.1.0
>            Reporter: Bikas Saha
>            Assignee: Chuan Liu
>         Attachments: HADOOP-8235-branch-1-win.patch
>
>
> The initial patch submitted on HADOOP-8223 does not have ability to set file permissions on Windows. This is causing tests to fail. Jira tracks adding support to enable file permissions and ownership changes on Windows

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira