diff --git a/core/src/main/java/com/cloud/storage/template/OVAProcessor.java b/core/src/main/java/com/cloud/storage/template/OVAProcessor.java index 33f7e28ac039..29b75e9d06b4 100644 --- a/core/src/main/java/com/cloud/storage/template/OVAProcessor.java +++ b/core/src/main/java/com/cloud/storage/template/OVAProcessor.java @@ -171,7 +171,7 @@ private void setFileSystemAccessRights(String templatePath) { LOGGER.warn("Unable to set permissions for files in " + templatePath + " due to " + result); } command = new Script("chmod", 0, LOGGER); - command.add("777", templatePath); + command.add("1777", templatePath); result = command.execute(); if (result != null) { LOGGER.warn("Unable to set permissions for " + templatePath + " due to " + result); diff --git a/plugins/hypervisors/hyperv/src/main/java/com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java b/plugins/hypervisors/hyperv/src/main/java/com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java index 9490ae07b307..631b3ebe9571 100644 --- a/plugins/hypervisors/hyperv/src/main/java/com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java +++ b/plugins/hypervisors/hyperv/src/main/java/com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java @@ -260,7 +260,7 @@ protected String mount(String path, String parent, String scheme, String query) // Change permissions for the mountpoint script = new Script(true, "chmod", _timeout, s_logger); - script.add("-R", "777", mountPoint); + script.add("-R", "1777", mountPoint); result = script.execute(); if (result != null) { s_logger.warn("Unable to set permissions for " + mountPoint + " due to " + result); diff --git a/services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/LocalNfsSecondaryStorageResource.java b/services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/LocalNfsSecondaryStorageResource.java index 6f189ef5f3c6..08270086e8eb 100644 --- a/services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/LocalNfsSecondaryStorageResource.java +++ b/services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/LocalNfsSecondaryStorageResource.java @@ -77,14 +77,14 @@ protected void mount(String localRootPath, String remoteDevice, URI uri, String // Change permissions for the mountpoint - seems to bypass authentication Script script = new Script(true, "chmod", _timeout, s_logger); - script.add("777", localRootPath); + script.add("1777", localRootPath); String result = script.execute(); if (result != null) { String errMsg = "Unable to set permissions for " + localRootPath + " due to " + result; s_logger.error(errMsg); throw new CloudRuntimeException(errMsg); } - s_logger.debug("Successfully set 777 permission for " + localRootPath); + s_logger.debug("Successfully set 1777 permission for " + localRootPath); // XXX: Adding the check for creation of snapshots dir here. Might have // to move it somewhere more logical later. diff --git a/test/src-not-used/main/java/com/cloud/test/stress/StressTestDirectAttach.java b/test/src-not-used/main/java/com/cloud/test/stress/StressTestDirectAttach.java index 5625830b2381..f60bedfd17b7 100644 --- a/test/src-not-used/main/java/com/cloud/test/stress/StressTestDirectAttach.java +++ b/test/src-not-used/main/java/com/cloud/test/stress/StressTestDirectAttach.java @@ -1112,7 +1112,7 @@ private static String sshWinTest(String host) { try { SCPClient scp = new SCPClient(conn); - scp.put("wget.exe", "wget.exe", "C:\\Users\\Administrator", "0777"); + scp.put("wget.exe", "wget.exe", "C:\\Users\\Administrator", "1777"); s_logger.info("Successfully put wget.exe file"); } catch (Exception ex) { s_logger.error("Unable to put wget.exe " + ex); diff --git a/test/src-not-used/main/java/com/cloud/test/stress/TestClientWithAPI.java b/test/src-not-used/main/java/com/cloud/test/stress/TestClientWithAPI.java index 3d43a9440c71..a6b39fdd1deb 100644 --- a/test/src-not-used/main/java/com/cloud/test/stress/TestClientWithAPI.java +++ b/test/src-not-used/main/java/com/cloud/test/stress/TestClientWithAPI.java @@ -2042,7 +2042,7 @@ private static String sshWinTest(String host) { try { SCPClient scp = new SCPClient(conn); - scp.put("wget.exe", "wget.exe", "C:\\Users\\Administrator", "0777"); + scp.put("wget.exe", "wget.exe", "C:\\Users\\Administrator", "1777"); s_logger.info("Successfully put wget.exe file"); } catch (Exception ex) { s_logger.error("Unable to put wget.exe " + ex);