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

Superuser privileges required to do "df"

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.18.1
    • 0.21.0
    • None
    • None
    • Reviewed
    • 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.

      Attachments

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

        Issue Links

          Activity

            People

              craigm Craig Macdonald
              bockelman 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