Update VMs to use my_mkdir

This commit is contained in:
SimonFair
2024-05-23 21:43:52 +01:00
parent 3ec2a92b41
commit f76337c97f
3 changed files with 18 additions and 18 deletions

View File

@@ -396,8 +396,8 @@ case 'disk-create':
$driver = $_REQUEST['driver'];
$size = str_replace(["KB","MB","GB","TB","PB", " ", ","], ["K","M","G","T","P", "", ""], strtoupper($_REQUEST['size']));
$dir = dirname($disk);
if (!is_dir($dir)) mkdir($dir);
#if (!is_dir($dir)) my_mkdir($dir);
#if (!is_dir($dir)) mkdir($dir);
if (!is_dir($dir)) my_mkdir($dir);
// determine the actual disk if user share is being used
$dir = transpose_user_path($dir);
#@exec("chattr +C -R ".escapeshellarg($dir)." >/dev/null");

View File

@@ -175,10 +175,10 @@
// create folder if needed
if (!is_dir($strImgFolder)) {
mkdir($strImgFolder, 0777, true);
#my_mkdir($strImgFolder, 0777, true);
chown($strImgFolder, 'nobody');
chgrp($strImgFolder, 'users');
#mkdir($strImgFolder, 0777, true);
my_mkdir($strImgFolder, 0777, true);
#chown($strImgFolder, 'nobody');
#chgrp($strImgFolder, 'users');
}
$this->set_folder_nodatacow($strImgFolder);
@@ -192,10 +192,10 @@
// create parent folder if needed
if (!is_dir($path_parts['dirname'])) {
mkdir($path_parts['dirname'], 0777, true);
#my_mkdir($path_parts['dirname'], 0777, true);
chown($path_parts['dirname'], 'nobody');
chgrp($path_parts['dirname'], 'users');
#mkdir($path_parts['dirname'], 0777, true);
my_mkdir($path_parts['dirname'], 0777, true);
#chown($path_parts['dirname'], 'nobody');
#chgrp($path_parts['dirname'], 'users');
}
$this->set_folder_nodatacow($path_parts['dirname']);
@@ -219,10 +219,10 @@
// create folder if needed
$strImgRawLocationParent = dirname($strImgRawLocationPath);
if (!is_dir($strImgRawLocationParent)) {
mkdir($strImgRawLocationParent, 0777, true);
#my_mkdir($strImgRawLocationParent, 0777, true);
chown($strImgRawLocationParent, 'nobody');
chgrp($strImgRawLocationParent, 'users');
#mkdir($strImgRawLocationParent, 0777, true);
my_mkdir($strImgRawLocationParent, 0777, true);
#chown($strImgRawLocationParent, 'nobody');
#chgrp($strImgRawLocationParent, 'users');
}
$this->set_folder_nodatacow($strImgRawLocationParent);

View File

@@ -1717,10 +1717,10 @@ private static $encoding = 'UTF-8';
if ($storage == "default") $clonedir = $domain_cfg['DOMAINDIR'].$clone ; else $clonedir = str_replace('/mnt/user/', "/mnt/$storage/", $domain_cfg['DOMAINDIR']).$clone;
if (!is_dir($clonedir)) {
mkdir($clonedir,0777,true);
#my_mkdir($clonedir,0777,true);
chown($clonedir, 'nobody');
chgrp($clonedir, 'users');
#mkdir($clonedir,0777,true);
my_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) ; }