From 2e08c69c5c9a4de50d2b1066bcbf5d0c45727cb2 Mon Sep 17 00:00:00 2001 From: skysiders <64545691+skysiders@users.noreply.github.com> Date: Fri, 3 Jun 2022 06:28:22 +0800 Subject: [PATCH] HBASE-26985 check permission for SecureBulkLoadManager (#4379) Signed-off-by: Viraj Jasani --- .../hadoop/hbase/regionserver/SecureBulkLoadManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java index a375d42177f..76f0beadc28 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java @@ -124,6 +124,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); + } } }