hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4139) fuse-dfs RO mode still allows file truncation
Date Mon, 12 Nov 2012 19:45:12 GMT

    [ https://issues.apache.org/jira/browse/HDFS-4139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495551#comment-13495551
] 

Colin Patrick McCabe commented on HDFS-4139:
--------------------------------------------

{code}
cmccabe@keter:~/hadoop3> CLASSPATH="/home/cmccabe/conf:$CLASSPATH" LIBHDFS_OPTS="-Xcheck:jni
-Xcheck:nabounds" ./hadoop-hdfs-project/hadoop-hdfs/target/native/main/native/fuse-dfs/fuse_dfs
-obig_writes -oro dfs://localhost:6000 /mnt/tmp/ -f
cmccabe@keter:~/conf> cat /proc/mounts | grep fuse_dfs
fuse_dfs /mnt/tmp fuse.fuse_dfs ro,nosuid,nodev,relatime,user_id=1014,group_id=100,default_permissions,allow_other
0 0
cmccabe@keter:~/conf> ls -l /mnt/tmp/foo2
-rw-r--r-- 1 cmccabe 99 47 Nov 12 11:42 /mnt/tmp/foo2
cmccabe@keter:~/conf> echo hi > /mnt/tmp/foo2
-bash: /mnt/tmp/foo2: Read-only file system
cmccabe@keter:~/conf> sudo chown root /mnt/tmp/foo2
root's password:
chown: changing ownership of `/mnt/tmp/foo2': Read-only file system
{code}
                
> fuse-dfs RO mode still allows file truncation
> ---------------------------------------------
>
>                 Key: HDFS-4139
>                 URL: https://issues.apache.org/jira/browse/HDFS-4139
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: fuse-dfs
>    Affects Versions: 2.0.2-alpha
>            Reporter: Andy Isaacson
>            Assignee: Colin Patrick McCabe
>         Attachments: HDFS-4139.001.patch
>
>
> Mounting a fuse-dfs in readonly mode with "-oro" still allows the user to truncate files.
> {noformat}
> $ 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
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message