Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-6488

Support HDFS superuser in NFSv3 gateway

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.7.0
    • Component/s: nfs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      As hdfs superuseruser on the NFS mount, I cannot cd or ls the /user/schu/.Trash directory:

      bash-4.1$ cd .Trash/
      bash: cd: .Trash/: Permission denied
      bash-4.1$ ls -la
      total 2
      drwxr-xr-x 4 schu 2584148964 128 Jan  7 10:42 .
      drwxr-xr-x 4 hdfs 2584148964 128 Jan  6 16:59 ..
      drwx------ 2 schu 2584148964  64 Jan  7 10:45 .Trash
      drwxr-xr-x 2 hdfs hdfs        64 Jan  7 10:42 tt
      bash-4.1$ ls .Trash
      ls: cannot open directory .Trash: Permission denied
      bash-4.1$
      

      When using FsShell as hdfs superuser, I have superuser permissions to schu's .Trash contents:

      bash-4.1$ hdfs dfs -ls -R /user/schu/.Trash
      drwx------   - schu supergroup          0 2014-01-07 10:48 /user/schu/.Trash/Current
      drwx------   - schu supergroup          0 2014-01-07 10:48 /user/schu/.Trash/Current/user
      drwx------   - schu supergroup          0 2014-01-07 10:48 /user/schu/.Trash/Current/user/schu
      -rw-r--r--   1 schu supergroup          4 2014-01-07 10:48 /user/schu/.Trash/Current/user/schu/tf1
      
      

      The NFSv3 logs don't produce any error when superuser tries to access schu Trash contents. However, for other permission errors (e.g. schu tries to delete a directory owned by hdfs), there will be a permission error in the logs.
      I think this is not specific to the .Trash directory perhaps.
      I created a /user/schu/dir1 which has the same permissions as .Trash (700). When I try cd'ing into the directory from the NFSv3 mount as hdfs superuser, I get the same permission denied.

      [schu@hdfs-nfs ~]$ hdfs dfs -ls
      Found 4 items
      drwx------   - schu supergroup          0 2014-01-07 10:57 .Trash
      drwx------   - schu supergroup          0 2014-01-07 11:05 dir1
      -rw-r--r--   1 schu supergroup          4 2014-01-07 11:05 tf1
      drwxr-xr-x   - hdfs hdfs                0 2014-01-07 10:42 tt
      bash-4.1$ whoami
      hdfs
      bash-4.1$ pwd
      /hdfs_nfs_mount/user/schu
      bash-4.1$ cd dir1
      bash: cd: dir1: Permission denied
      bash-4.1$
      
      1. HDFS-6488.001.patch
        3 kB
        Brandon Li
      2. HDFS-6488.002.patch
        8 kB
        Brandon Li
      3. HDFS-6488.003.patch
        8 kB
        Brandon Li

        Issue Links

          Activity

          Brandon Li made changes -
          Fix Version/s 2.7.0 [ 12327584 ]
          Brandon Li made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags Reviewed [ 10343 ]
          Resolution Fixed [ 1 ]
          Brandon Li made changes -
          Summary HDFS superuser unable to access user's Trash files using NFSv3 mount Support HDFS superuser in NFSv3 gateway
          Brandon Li made changes -
          Issue Type Bug [ 1 ] New Feature [ 2 ]
          Brandon Li made changes -
          Attachment HDFS-6488.003.patch [ 12702216 ]
          Brandon Li made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Brandon Li made changes -
          Attachment HDFS-6488.002.patch [ 12702017 ]
          Brandon Li made changes -
          Assignee Brandon Li [ brandonli ]
          Brandon Li made changes -
          Attachment HDFS-6488.001.patch [ 12701232 ]
          Colin Patrick McCabe made changes -
          Field Original Value New Value
          Link This issue is related to HDFS-6498 [ HDFS-6498 ]
          Stephen Chu created issue -

            People

            • Assignee:
              Brandon Li
              Reporter:
              Stephen Chu
            • Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development