jalogut / magento2-deployer-plus

Tool based on deployer.org to perform zero downtime deployments of Magento 2 projects
GNU General Public License v3.0
200 stars 59 forks source link

Wrong permissions when extracting archive #53

Closed erfanimani closed 4 years ago

erfanimani commented 4 years ago

We keep running into permission issues after a deployment, and, while permissions are set correctly when creating the archive, it seems that they're not retained when extracting the archive.

Permissions are set correctly here: https://github.com/jalogut/magento2-deployer-plus/blob/master/recipe/magento_2_1/files.php#L20

But are not retained here: https://github.com/jalogut/magento2-deployer-plus/blob/master/recipe/magento_2_2/artifact.php#L30

I think a -p flag is needed: https://www.gnu.org/software/tar/manual/html_node/Setting-Access-Permissions.html#SEC82

I just thought I'd post here first before creating a PR, because I find it strange I'm only running into this issue now (after having used this for years).

It could be that I'm only running into this issue now because of different umask settings, and that most writable directories are shared between deployments anyway (and so setting perms once manually would fix it for good). On top of that, some directories don't need to be writable, such as vendor, pub/static (other than bug #13225) and app/etc, unless you're in developer mode and would like to change env.php through the admin).

osrecio commented 4 years ago

Check the PR , I made some comments!

Thanks!

osrecio commented 4 years ago

This issue was solved by @erfanimani in the PR #54

Thanks!