HBASE-26985 check permission for SecureBulkLoadManager (#4379)

Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
skysiders 2022-06-03 06:28:22 +08:00 committed by Viraj Jasani
parent 58aaed19b0
commit 286c9c3327
No known key found for this signature in database
GPG Key ID: 08E70F70AB71C5A1
1 changed files with 4 additions and 0 deletions

View File

@ -125,6 +125,10 @@ public class SecureBulkLoadManager {
}
if (!fs.exists(baseStagingDir)) {
fs.mkdirs(baseStagingDir, PERM_HIDDEN);
if (!PERM_HIDDEN.equals(PERM_HIDDEN.applyUMask(FsPermission.getUMask(conf)))) {
LOG.info("Modifying permissions to " + PERM_HIDDEN);
fs.setPermission(baseStagingDir, PERM_HIDDEN);
}
}
}