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

chmod 777 the .snapshot directory does not error that modification on RO snapshot is disallowed

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.4-alpha, 3.0.0-alpha1
    • Fix Version/s: None
    • Component/s: snapshots
    • Labels:
      None

      Description

      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.

      [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]$ 
      

        Attachments

          Activity

            People

            • Assignee:
              xiaochen Xiao Chen
              Reporter:
              schu Stephen Chu
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: