Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12718

Incorrect error message by fs -put local dir without permission

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0-alpha2
    • Component/s: None
    • Labels:
    • Target Version/s:
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      Hide
      <!-- markdown -->

      The `hadoop fs -ls` command now prints "Permission denied" rather than "No such file or directory" when the user doesn't have permission to traverse the path.
      Show
      <!-- markdown --> The `hadoop fs -ls` command now prints "Permission denied" rather than "No such file or directory" when the user doesn't have permission to traverse the path.

      Description

      When the user doesn't have access permission to the local directory, the "hadoop fs -put" command prints a confusing error message "No such file or directory".

      $ whoami
      systest
      $ cd /home/systest
      $ ls -ld .
      drwx------. 4 systest systest 4096 Jan 13 14:21 .
      $ mkdir d1
      $ sudo -u hdfs hadoop fs -put d1 /tmp
      put: `d1': No such file or directory
      

      It will be more informative if the message is:

      put: d1 (Permission denied)
      

      If the source is a local file, the error message is ok:

      put: f1 (Permission denied)
      

        Attachments

        1. HADOOP-12718.001.patch
          2 kB
          John Zhuge
        2. HADOOP-12718.002.patch
          2 kB
          John Zhuge
        3. HADOOP-12718.003.patch
          4 kB
          John Zhuge
        4. HADOOP-12718.004.patch
          1 kB
          Chris Nauroth
        5. HADOOP-12718.005.patch
          4 kB
          John Zhuge
        6. HADOOP-12718.006.patch
          4 kB
          John Zhuge
        7. HADOOP-12718.007.patch
          5 kB
          John Zhuge
        8. HADOOP-12718.008.patch
          5 kB
          John Zhuge
        9. TestFsShellCopyPermission.001.patch
          4 kB
          John Zhuge
        10. TestFsShellCopyPermission-output.001.txt
          2 kB
          John Zhuge
        11. TestFsShellCopyPermission-output.002.txt
          2 kB
          John Zhuge

          Issue Links

            Activity

              People

              • Assignee:
                jzhuge John Zhuge
                Reporter:
                jzhuge John Zhuge
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: