[pve-devel] [PATCH pve-manager 1/1] Fix #2634: if hook-script without permission, prints message, that the script not executable.

Moayad Almalat m.almalat at proxmox.com
Thu Mar 12 09:05:12 CET 2020


Signed-off-by: Moayad Almalat <m.almalat at proxmox.com>
---
 PVE/VZDump.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index ada3681e..df6f8df9 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -569,6 +569,10 @@ sub run_hook_script {
 
     my $script = $opts->{script};
 
+    unless (-X $script) {
+	    debugmsg('err', "$phase: The hook-script '$script' is not executable.");
+    }
+
     return if !$script;
 
     my $cmd = "$script $phase";
-- 
2.20.1




More information about the pve-devel mailing list