diff --git a/include/cli/modules/package.php b/include/cli/modules/package.php
index 0374f27d6f6831bc868fc9f0aa2e743b2260412a..e1649e77890e3529bf86c12b3057f1dead5815e6 100644
--- a/include/cli/modules/package.php
+++ b/include/cli/modules/package.php
@@ -125,7 +125,7 @@ class Packager extends Deployment {
                     if ($php56) {
                         // Set the Unix mode of the file
                         $stat = stat($full);
-                        $zip->setExternalAttributesName($local, ZipArchive::OPSYS_UNIX, $stat['mode']);
+                        $zip->setExternalAttributesName($local, ZipArchive::OPSYS_UNIX, $stat['mode'] << 16);
                     }
             }
         };