Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-16582

LocalFileSystem's mkdirs() does not work as expected under viewfs.

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.10.0, 3.3.0, 2.8.6, 2.9.3, 3.1.3, 3.2.2
    • None
    • None
    • Reviewed

    Description

      When mkdirs(Path) is called against LocalFileSystem, the implementation in RawLocalFileSystem is called and the directory permission is determined by the umask. However, if it is under ViewFileSystem, the default implementation in FileSystem is called and this causes explicit chmod() to 0777.

      The mkdirs(Path) method needs to be overriden in

      • ViewFileSystem to avoid calling the default implementation
      • ChRootedFileSystem for proper resolution of viewfs mount table
      • FilterFileSystem to avoid calling the default implementation

      Only then the same method in the target (LocalFileSystem in this case) will be called. Hdfs does not suffer from the same flaw since it applies umask in all cases, regardless of what version of mkdirs() was called.

      Attachments

        1. HADOOP-16582.1.patch
          4 kB
          Kihwal Lee
        2. HADOOP-16582.patch
          4 kB
          Kihwal Lee

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            kihwal Kihwal Lee
            kihwal Kihwal Lee
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment