diff --git ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java index bb040b3..b6d9b6a 100644 --- ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java +++ ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java @@ -783,6 +783,9 @@ private String downloadResource(String value, boolean convertToUnix) { FileSystem fs = FileSystem.get(new URI(value), conf); fs.copyToLocalFile(new Path(value), new Path(destinationFile.getCanonicalPath())); value = destinationFile.getCanonicalPath(); + + // add "execute" permission to downloaded resource file (needed when loading dll file) + FileUtil.chmod(value, "ugo+rx", true); if (convertToUnix && DosToUnix.isWindowsScript(destinationFile)) { try { DosToUnix.convertWindowsScriptToUnix(destinationFile);