HiveConf conf) throws IOException {
boolean copied = FileUtil.copy(srcFS, src, dstFS, dst, deleteSource, overwrite, conf);
boolean inheritPerms = conf.getBoolVar(HiveConf.ConfVars.HIVE_WAREHOUSE_SUBDIR_INHERIT_PERMS);
if (copied && inheritPerms) {
HadoopShims shims = ShimLoader.getHadoopShims();
HdfsFileStatus fullFileStatus = shims.getFullFileStatus(conf, dstFS, dst);
try {
shims.setFullFileStatus(conf, fullFileStatus, dstFS, dst);
} catch (Exception e) {
LOG.warn("Error setting permissions or group of " + dst, e);
}