private void checkSubDir(final Path p, final String dirPermsConfName) throws IOException {
    FileSystem fs = p.getFileSystem(conf);
    FsPermission dirPerms = new FsPermission(conf.get(dirPermsConfName, "700"));
    if (!fs.exists(p)) {
      if (isSecurityEnabled) {
        if (!fs.mkdirs(p, secureRootSubDirPerms)) {
          throw new IOException("HBase directory '" + p + "' creation failure.");
        }
      } else {
        if (!fs.mkdirs(p)) {
          throw new IOException("HBase directory '" + p + "' creation failure.");
        }
      }
    }
    if (isSecurityEnabled && !dirPerms.equals(fs.getFileStatus(p).getPermission())) {
      // check whether the permission match
      LOG.warn("Found HBase directory permissions NOT matching expected permissions for "
        + p.toString() + " permissions=" + fs.getFileStatus(p).getPermission() + ", expecting "
        + dirPerms + ". Automatically setting the permissions. "
        + "You can change the permissions by setting \"" + dirPermsConfName
        + "\" in hbase-site.xml " + "and restarting the master");
      fs.setPermission(p, dirPerms);
    }
  }
Make sure the directories under rootDir have good permissions. Create if necessary.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java