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

Incorrect exit codes for "dfs -chown", "dfs -chgrp"

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

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.19.1, 0.20.0, 0.20.1, 0.20.2
    • 0.20.3, 0.21.0
    • fs
    • None
    • Incompatible change, Reviewed
    • Commands chmod, chown and chgrp now returns non zero exit code and an error message on failure instead of returning zero.
    • yahoo 20.10

    Description

      ravi@localhost:~$ hadoop dfs -chgrp abcd /; echo $?
      chgrp: changing ownership of
      'hdfs://localhost/':org.apache.hadoop.security.AccessControlException: Permission denied
      0

      ravi@localhost:~$ hadoop dfs -chown abcd /; echo $?
      chown: changing ownership of
      'hdfs://localhost/':org.apache.hadoop.security.AccessControlException: Permission denied
      0

      ravi@localhost:~$ hadoop dfs -chmod 755 /DOESNTEXIST; echo $?
      chmod: could not get status for '/DOESNTEXIST': File does not exist: /DOESNTEXIST
      0

      -

      Exit codes for both of the above invocations should be non-zero to indicate that the command failed.

      Attachments

        1. HADOOP-6701-trunk.patch
          11 kB
          Suresh Srinivas
        2. HADOOP-6701-trunk.patch
          11 kB
          Ravi Phulari
        3. HADOOP-6701-v20.patch
          11 kB
          Ravi Phulari

        Issue Links

        Activity

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

          People

            raviphulari Ravi Phulari
            raviphulari Ravi Phulari
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment