Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4139

fuse-dfs RO mode still allows file truncation

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2-alpha
    • Fix Version/s: 2.0.3-alpha
    • Component/s: fuse-dfs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Mounting a fuse-dfs in readonly mode with "-oro" still allows the user to truncate files.

      $ grep fuse /etc/fstab
      hadoop-fuse-dfs#dfs://ubu-cdh-0.local /export/hdfs fuse noauto,ro 0 0
      $ sudo mount /export/hdfs
      $ hdfs dfs -ls /tmp
      ...
      -rw-r--r--   3 ubuntu hadoop          4 2012-11-01 14:18 /tmp/blah.txt
      $ echo foo > /export/hdfs/tmp/blah.txt
      -bash: /export/hdfs/tmp/blah.txt: Permission denied
      $  hdfs dfs -ls /tmp
      ...
      -rw-r--r--   3 ubuntu hadoop          0 2012-11-01 14:28 /tmp/blah.txt
      $ ps ax | grep dfs
      ...
      13639 ?        Ssl    0:02 /usr/lib/hadoop/bin/fuse_dfs dfs://ubu-cdh-0.local /export/hdfs -o ro,dev,suid
      

        Attachments

        1. HDFS-4139.001.patch
          4 kB
          Colin McCabe
        2. HDFS-4139.002.patch
          5 kB
          Colin McCabe

        Issue Links

          Activity

            People

            • Assignee:
              cmccabe Colin McCabe
              Reporter:
              adi2 Andy Isaacson

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment