zfcampus / zf-deploy

BSD 3-Clause "New" or "Revised" License
66 stars 24 forks source link

zfdeploy.phar build does not preserve file permission #14

Closed metanav closed 10 years ago

metanav commented 10 years ago

The zfdeploy.phar build command does not preserve the file permission in the created package. This functionality should be included as it would help in deployment process automation.

weierophinney commented 10 years ago

The patch above addresses this. Kind of. There are some limitations:

That said, I did verify that the changes I introduced are correctly setting the directory and file permissions in the temporary directory we package from. The question is if we can find a routine that will ensure those permissions are retained in the package.

weierophinney commented 10 years ago

In doing some work on this, I discovered that "directories" in a PharData/Phar file are metadata only, and thus cannot accept a chmod operation (actually raises a fatal error when you try).

As such, I cannot do anything more on this. You will need to add some logic when deploying to set directory permissions if those present in the archives will not work.