]> git.proxmox.com Git - pve-manager.git/commitdiff
fix #2634: print specific error if hook-script is not executable
authorMoayad Almalat <m.almalat@proxmox.com>
Thu, 12 Mar 2020 11:18:18 +0000 (12:18 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 12 Mar 2020 15:32:32 +0000 (16:32 +0100)
Signed-off-by: Moayad Almalat <m.almalat@proxmox.com>
Tested-by: Oguz Bektas <o.bektas@proxmox.com>
PVE/VZDump.pm

index ada3681ec629996a3b65bd931194f6f07af4ef58..5f7f7725a0def6ed012e77763b595018a4271b5e 100644 (file)
@@ -571,6 +571,12 @@ sub run_hook_script {
 
     return if !$script;
 
+    if (!-x $script) {
+           die "The hook-script '$script' is not executable.\n"
+    }
+
+
+
     my $cmd = "$script $phase";
 
     $cmd .= " $task->{mode} $task->{vmid}" if ($task);