static void checkAndSetFileOwnerPermissions(FileSystem fs, Path path,
                                              String userName, String groupName,
                                              FsPermission dirPerms, FsPermission filePerms,
                                              boolean dryRun, boolean recurse) throws IOException {
    FileStatus fStatus = getFileStatus(fs, path);
    checkAndSetFileOwnerPermissions(fs, fStatus, userName, groupName, dirPerms, filePerms, dryRun, recurse);
  }
Recursively check the file owner and permissions, setting them to the passed in values
if the owner/perms of the file do not match.
@param fs
@param path
@param userName  Owner of the file to compare/set. Null to skip this check.
@param groupName Group of the file to compare/set. Null to skip this check.
@param dirPerms  Permissions to compare/set, if the file is a directory. Null to skip this check.
@param filePerms Permissions to compare/set, if the file is a file. Null to skip this check.
@param dryRun    Dry run - check but do not actually set
@param recurse   Whether to recursively check/set the contents of a directory
@throws IOException
ql/src/java/org/apache/hadoop/hive/ql/util/HiveStrictManagedMigration.java