HADOOP-9851. dfs -chown does not like "+" plus sign in user name. Contributed by Andras Bokor.
This commit is contained in:
parent
fc4ebb0499
commit
c8ed33cd2a
@ -112,7 +112,7 @@ protected void processPath(PathData item) throws IOException {
|
|||||||
|
|
||||||
// used by chown/chgrp
|
// used by chown/chgrp
|
||||||
static private String allowedChars = Shell.WINDOWS ? "[-_./@a-zA-Z0-9 ]" :
|
static private String allowedChars = Shell.WINDOWS ? "[-_./@a-zA-Z0-9 ]" :
|
||||||
"[-_./@a-zA-Z0-9]";
|
"[-+_./@a-zA-Z0-9]";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to change owner and/or group of files
|
* Used to change owner and/or group of files
|
||||||
|
@ -1468,6 +1468,9 @@ public void testFilePermissions() throws IOException {
|
|||||||
|
|
||||||
runCmd(shell, "-chgrp", "hadoop-core@apache.org/100", file);
|
runCmd(shell, "-chgrp", "hadoop-core@apache.org/100", file);
|
||||||
confirmOwner(null, "hadoop-core@apache.org/100", fs, path);
|
confirmOwner(null, "hadoop-core@apache.org/100", fs, path);
|
||||||
|
|
||||||
|
runCmd(shell, "-chown", "MYCOMPANY+user.name:hadoop", file);
|
||||||
|
confirmOwner("MYCOMPANY+user.name", "hadoop", fs, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user