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

Unnecessary permission denied error when creating/deleting snapshots with a non-existent directory

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

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Duplicate
    • 3.0.0-alpha1
    • None
    • snapshots

    Description

      As a non-superuser, when you create and delete a snapshot but accidentally specify a non-existent directory to snapshot, you will see an extra/unnecessary permission denied error right after the "No such file or directory" error.

      [schu@hdfs-snapshots-vanilla ~]$ hdfs dfs -deleteSnapshot /user/schuf/ snap1
      deleteSnapshot: `/user/schuf/': No such file or directory
      deleteSnapshot: Permission denied
      [schu@hdfs-snapshots-vanilla ~]$ hdfs dfs -createSnapshot /user/schuf/ snap1
      createSnapshot: `/user/schuf/': No such file or directory
      createSnapshot: Permission denied
      

      As the HDFS superuser, instead of the "Permission denied" error you'll get an extra "Directory does not exist" error.

      [root@hdfs-snapshots-vanilla ~]# hdfs dfs -deleteSnapshot /user/schuf/ snap1
      deleteSnapshot: `/user/schuf/': No such file or directory
      deleteSnapshot: Directory does not exist: /user/schuf
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            boky01 Andras Bokor
            schu Stephen Chu
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment