From 2a029220a757209b33be42f7db72e4f18c5ed9e5 Mon Sep 17 00:00:00 2001 From: Deltik Date: Tue, 1 Jan 2019 11:48:10 -0600 Subject: [PATCH] cPanelDeployer: Preserve file permissions in ZipArchive Reference: https://stackoverflow.com/a/53997599/1038828 --- e107 | 2 +- lib/deployers/cPanelDeployer.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/e107 b/e107 index 4d0c0601d..0f96f7cab 160000 --- a/e107 +++ b/e107 @@ -1 +1 @@ -Subproject commit 4d0c0601d0ed89112b5045da81937146b5d19b8f +Subproject commit 0f96f7cabddfb4690497fc6b22f25da2f4330de2 diff --git a/lib/deployers/cPanelDeployer.php b/lib/deployers/cPanelDeployer.php index fd98914cc..1931fc7c5 100644 --- a/lib/deployers/cPanelDeployer.php +++ b/lib/deployers/cPanelDeployer.php @@ -362,6 +362,7 @@ class cPanelDeployer extends Deployer empty($relpath)) continue; $relpath = $prefix . $relpath; $archive->addFile($realpath, $relpath); + $archive->setExternalAttributesName($relpath, ZipArchive::OPSYS_UNIX, fileperms($realpath) << 16); } $archive->close();