You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Xiao Chen (JIRA)" <ji...@apache.org> on 2015/09/30 00:42:04 UTC

[jira] [Resolved] (HDFS-4981) chmod 777 the .snapshot directory does not error that modification on RO snapshot is disallowed

     [ https://issues.apache.org/jira/browse/HDFS-4981?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xiao Chen resolved HDFS-4981.
-----------------------------
    Resolution: Won't Fix

> chmod 777 the .snapshot directory does not error that modification on RO snapshot is disallowed
> -----------------------------------------------------------------------------------------------
>
>                 Key: HDFS-4981
>                 URL: https://issues.apache.org/jira/browse/HDFS-4981
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: snapshots
>    Affects Versions: 3.0.0, 2.0.4-alpha
>            Reporter: Stephen Chu
>            Assignee: Xiao Chen
>            Priority: Trivial
>
> Snapshots currently are RO, so it's expected that when someone tries to modify the .snapshot directory s/he is denied.
> However, if the user tries to chmod 777 the .snapshot directory, the operation does not error. The user should be alerted that modifications are not allowed, even if this operation didn't actually change anything.
> Using other modes will trigger the error, though.
> {code}
> [schu@hdfs-snapshots-1 hdfs]$ sudo -u hdfs hdfs dfs -chmod 777 /user/schu/test_dir_1/.snapshot/
> [schu@hdfs-snapshots-1 hdfs]$ sudo -u hdfs hdfs dfs -chmod 755 /user/schu/test_dir_1/.snapshot/
> chmod: changing permissions of '/user/schu/test_dir_1/.snapshot': Modification on a read-only snapshot is disallowed
> [schu@hdfs-snapshots-1 hdfs]$ sudo -u hdfs hdfs dfs -chmod 435 /user/schu/test_dir_1/.snapshot/
> chmod: changing permissions of '/user/schu/test_dir_1/.snapshot': Modification on a read-only snapshot is disallowed
> [schu@hdfs-snapshots-1 hdfs]$ sudo -u hdfs hdfs dfs -chown hdfs /user/schu/test_dir_1/.snapshot/
> chown: changing ownership of '/user/schu/test_dir_1/.snapshot': Modification on a read-only snapshot is disallowed
> [schu@hdfs-snapshots-1 hdfs]$ sudo -u hdfs hdfs dfs -chown schu /user/schu/test_dir_1/.snapshot/
> chown: changing ownership of '/user/schu/test_dir_1/.snapshot': Modification on a read-only snapshot is disallowed
> [schu@hdfs-snapshots-1 hdfs]$ 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)