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

hdfs dfs -setfacl error message is misleading

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • None

    Description

      When I type

      hdfs dfs -setfacl -m default:user::rwx

      It prints error message:

      -setfacl: <acl_spec> is missing
      Usage: hadoop fs [generic options] -setfacl [-R] [{-b|-k} {-m|-x <acl_spec>} <path>]|[--set <acl_spec> <path>]
      

      But actually, it's the path that I missed. A correct command should be

      hdfs dfs -setfacl -m default:user::rwx /data
      

      In fact,

      -setfacl -x | -m | --set

      expects two parameters.
      We should print error message like this if it misses one:

      -setfacl: Missing either <acl_spec> or <path>
      

      and print the following if it misses two:

      -setfacl: Missing arguments: <acl_spec> <path>
      

      Attachments

        1. HDFS-9852.002.patch
          3 kB
          Wei-Chiu Chuang
        2. HDFS-9852.001.patch
          1 kB
          Wei-Chiu Chuang

        Activity

          People

            weichiu Wei-Chiu Chuang
            weichiu Wei-Chiu Chuang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: