#9771 added execution permission in files
This commit is contained in:
parent
d52e31e94c
commit
18719a3ac4
|
@ -430,10 +430,7 @@ class ManageExtensions extends HTML
|
|||
return false;
|
||||
}
|
||||
|
||||
chmod($installationFolder, 0777);
|
||||
foreach (glob($installationFolder.'/*') as $file) {
|
||||
chmod($file, 0777);
|
||||
}
|
||||
$this->setPermissionfiles($installationFolder);
|
||||
|
||||
$result = $this->copyExtensionToServer($installationFolder, $nameFolder);
|
||||
if ($result === false) {
|
||||
|
@ -476,10 +473,7 @@ class ManageExtensions extends HTML
|
|||
}
|
||||
|
||||
$result = $this->copyFolder($path, $serverPath, $filesToExclude);
|
||||
chmod($serverPath, 0777);
|
||||
foreach (glob($serverPath.'/*') as $file) {
|
||||
chmod($file, 0777);
|
||||
}
|
||||
$this->setPermissionfiles($serverPath);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
@ -983,4 +977,27 @@ class ManageExtensions extends HTML
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set execution permission in folder items and subfolders.
|
||||
*
|
||||
* @param string $path Path folder to apply permissions.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function setPermissionfiles($path)
|
||||
{
|
||||
chmod($path, 0777);
|
||||
|
||||
if (is_dir($path)) {
|
||||
$items = scandir($path);
|
||||
foreach ($items as $item) {
|
||||
if ($item != '.' && $item != '..') {
|
||||
$itemPath = $path.'/'.$item;
|
||||
$this->setPermissionfiles($itemPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue