Hadoop Common
  1. Hadoop Common
  2. HADOOP-4368

Superuser privileges required to do "df"

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.18.1
    • Fix Version/s: 0.21.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      New filesystem shell command -df reports capacity, space used and space free. Any user may execute this command without special privileges.

      Description

      super user privileges are required in DFS in order to get the file system statistics (FSNamesystem.java, getStats method). This means that when HDFS is mounted via fuse-dfs as a non-root user, "df" is going to return 16exabytes total and 0 free instead of the correct amount.

      As far as I can tell, there's no need to require super user privileges to see the file system size (and historically in Unix, this is not required).

      To fix this, simply comment out the privilege check in the getStats method.

      1. Test plan for hadoop fs -df.html
        5 kB
        Ravi Phulari
      2. hadoop4368.fsstatus.v7.patch
        24 kB
        Craig Macdonald
      3. hadoop4368.fsstatus.v6.patch
        20 kB
        Craig Macdonald
      4. hadoop4368.fsstatus.v5.patch
        19 kB
        Craig Macdonald
      5. hadoop4368.fsstatus.v4.patch
        19 kB
        Craig Macdonald
      6. hadoop4368.fsstatus.v3.patch
        16 kB
        Craig Macdonald
      7. hadoop4368.fsstatus.v2.patch
        9 kB
        Craig Macdonald
      8. hadoop4368.fsstatus.patch
        7 kB
        Craig Macdonald
      9. fuse_statfs_trunk.patch
        1 kB
        Brian Bockelman
      10. fuse_statfs.patch
        1 kB
        Brian Bockelman

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Craig Macdonald
              Reporter:
              Brian Bockelman
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development