mirror of
https://github.com/hauke68/Magallanes.git
synced 2025-09-13 12:40:18 +02:00
doing permission fix before actual relase, prevents from cases when released code cannot be accessed while chown is working
This commit is contained in:
parent
b9349cf42b
commit
5e84f0ada4
@ -74,21 +74,21 @@ class ReleaseTask extends AbstractTask implements IsReleaseAware, SkipOnOverride
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove symlink if exists; create new symlink and change owners
|
if ($resultFetch && $userGroup != '') {
|
||||||
$tmplink = $currentCopy . '.tmp';
|
$command = 'chown -h ' . $userGroup . ' ' . $symlink
|
||||||
$command = 'ln -sfn ' . $currentCopy . ' ' . $tmplink
|
|
||||||
. ' && '
|
|
||||||
. 'mv -T ' . $tmplink . ' ' . $symlink;
|
|
||||||
|
|
||||||
if ($resultFetch && $userGroup != '') {
|
|
||||||
$command .= ' && '
|
|
||||||
. 'chown -h ' . $userGroup . ' ' . $symlink
|
|
||||||
. ' && '
|
. ' && '
|
||||||
. 'chown -R ' . $userGroup . ' ' . $currentCopy
|
. 'chown -R ' . $userGroup . ' ' . $currentCopy
|
||||||
. ' && '
|
. ' && '
|
||||||
. 'chown ' . $userGroup . ' ' . $releasesDirectory;
|
. 'chown ' . $userGroup . ' ' . $releasesDirectory;
|
||||||
|
$result = $this->runCommandRemote($command);
|
||||||
|
if (!$result) {
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove symlink if exists; create new symlink and change owner
|
||||||
|
$tmplink = $currentCopy . '.tmp';
|
||||||
|
$command = "ln -sfn {$currentCopy} {$tmplink} && mv -fT {$tmplink} {$symlink}";
|
||||||
$result = $this->runCommandRemote($command);
|
$result = $this->runCommandRemote($command);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
|
Loading…
Reference in New Issue
Block a user