public static void checkFileAccess(FileSystem fs, FileStatus stat, FsAction action)
      throws IOException, LoginException {
    checkFileAccess(fs, stat, action, SecurityUtils.getUGI());
  }
Check the permissions on a file.
@param fs Filesystem the file is contained in
@param stat Stat info for the file
@param action action to be performed
@throws IOException If thrown by Hadoop
@throws AccessControlException if the file cannot be accessed
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/HdfsUtils.java