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 GitHub
parent 313a37f7ac
commit c0e8243c8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
}
}
}