acl - hadoop setfacl --set not working -


using hadoop-2.6.0 secured kerberos. trying set acl directory using below command

command

hadoop fs -setfacl --set user::rwx,user:user1:---,group::rwx,other::rwx /test1 

it gives message "too many arguments"

error

-setfacl: many arguments usage: hadoop fs [generic options] -setfacl [-r] [{-b|-k} {-m|-x <acl_spec>} <path>]|[--set <acl_spec> <path>] 

i sure command syntax correct , same command works fine when executing rest api.

need solution this.

this correct syntax hdfs setfacl command. if you're running windows cmd.exe, may need wrap command line parameters in quotes if contain of cmd.exe parameter delimiters. in cmd.exe, parameter delimiters space, comma, semicolon , equal sign. syntax acl spec contains commas, need wrap in quotes. otherwise, cmd.exe splits multiple arguments before invoking hadoop code, , why see error many arguments. when ran on windows, worked:

hadoop fs -setfacl --set "user::rwx,user:user1:---,group::rwx,other::rwx" /test1 

Comments