Ensure file permissions are preserved during safe-upgrade copy operations

This commit is contained in:
Andy Miller
2025-11-18 18:28:46 +00:00
parent 3b1c332932
commit 93089241c3

View File

@@ -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);
}
}
}
}