HBASE-26994 MasterFileSystem create directory without permission check (#4391)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
parent
6cd31edf5c
commit
ad2180b75d
|
@ -330,7 +330,7 @@ public class MasterFileSystem {
|
|||
throw new IOException("HBase directory '" + p + "' creation failure.");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
if (isSecurityEnabled && !dirPerms.equals(fs.getFileStatus(p).getPermission())) {
|
||||
// check whether the permission match
|
||||
LOG.warn("Found HBase directory permissions NOT matching expected permissions for "
|
||||
|
@ -341,7 +341,6 @@ public class MasterFileSystem {
|
|||
fs.setPermission(p, dirPerms);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check permissions for bulk load staging directory. This directory has special hidden
|
||||
|
@ -354,9 +353,9 @@ public class MasterFileSystem {
|
|||
if (!this.fs.mkdirs(p, HiddenDirPerms)) {
|
||||
throw new IOException("Failed to create staging directory " + p.toString());
|
||||
}
|
||||
} else {
|
||||
this.fs.setPermission(p, HiddenDirPerms);
|
||||
}
|
||||
this.fs.setPermission(p, HiddenDirPerms);
|
||||
|
||||
} catch (IOException e) {
|
||||
LOG.error("Failed to create or set permission on staging directory " + p.toString());
|
||||
throw new IOException(
|
||||
|
|
Loading…
Reference in New Issue