private static void addPrivilegesFromFS(
      String userName, RequiredPrivileges availPrivs, FileSystem fs,
      FileStatus[] fileStatuses, boolean recurse) throws Exception {
    // We need to obtain an intersection of all the privileges
    if (fileStatuses.length > 0){
      Set<SQLPrivTypeGrant> privs = getPrivilegesFromFS(userName, fs, fileStatuses[0], recurse);

      for (int i = 1; (i < fileStatuses.length) && (privs.size() > 0); i++){
        privs.retainAll(getPrivilegesFromFS(userName, fs, fileStatuses[i], recurse));
      }
      availPrivs.addAll(privs.toArray(new SQLPrivTypeGrant[privs.size()]));
    }
  }
Map permissions for this uri to SQL Standard privileges
@param filePath
@param conf
@param userName
@return
@throws HiveAuthzPluginException
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLAuthorizationUtils.java