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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.10.0, 3.3.0, 2.8.6, 2.9.3, 3.1.3, 3.2.2
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      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.patch
          4 kB
          Kihwal Lee
        2. HADOOP-16582.1.patch
          4 kB
          Kihwal Lee

          Activity

            People

            • Assignee:
              kihwal Kihwal Lee
              Reporter:
              kihwal Kihwal Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: