diff --git a/system/src/Grav/Common/Upgrade/SafeUpgradeService.php b/system/src/Grav/Common/Upgrade/SafeUpgradeService.php index 159c58d4c..e313f2bc3 100644 --- a/system/src/Grav/Common/Upgrade/SafeUpgradeService.php +++ b/system/src/Grav/Common/Upgrade/SafeUpgradeService.php @@ -503,6 +503,10 @@ class SafeUpgradeService if (!@copy($source, $destination)) { throw new RuntimeException(sprintf('Failed to copy file "%s" to "%s".', $source, $destination)); } + $perms = @fileperms($source); + if ($perms !== false) { + @chmod($destination, $perms & 0777); + } } } }