From cf13a33f00a53d0b8f6d5835a272f28fc7d560e7 Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Sun, 2 Jul 2023 21:54:34 +0100 Subject: [PATCH] Fir directory permissions. --- .../plugins/dynamix.vm.manager/include/libvirt_helpers.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php index 5bea9798a..dab7136d1 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php +++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php @@ -1544,7 +1544,11 @@ private static $encoding = 'UTF-8'; } $clonedir = $domain_cfg['DOMAINDIR'].$clone ; - if (!is_dir($clonedir)) mkdir($clonedir) ; + if (!is_dir($clonedir)) { + mkdir($clonedir,0777,true) ; + chown($clonedir, 'nobody'); + chgrp($clonedir, 'users'); + } write("addLog\0".htmlspecialchars("Checking for image files")); if ($file_exists && $overwrite != "yes") { write("addLog\0".htmlspecialchars(_("New image file names exist and Overwrite is not allowed"))); return( false) ; }