I found this while working on #1072668: Improve git executable check: even if git supports file mode, Drush loses them when copying the directory at its final place.

Comments

kotnik’s picture

StatusFileSize
new663 bytes

This patch fixes this.

greg.1.anderson’s picture

Status: Active » Needs work

Maybe this should have an if (!drush_is_windows()) test, or better yet, a drush wrapper that might be utilized wherever this sort of thing is needed (if anywhere else?) to fix perms. Maybe copy is the only place, in which case drush_copy is already a sufficient wrapper.

kotnik’s picture

I think that Windows will ignore chmod silently, but I am not sure and can not test since I don't use it.

Could someone confirm?

greg.1.anderson’s picture

Status: Needs work » Needs review

Yes, from the chmod manual, it appears you are correct. Probably safe to commit w/out Windows verification, although it would be nice to have.

kotnik’s picture

StatusFileSize
new703 bytes

Sure, here's the test for Windows environment.

But I think that additional wrapper would be an overshot.

greg.1.anderson’s picture

Version: » All-versions-4.x-dev
Status: Needs review » Patch (to be ported)

Committed #5 to master.

msonnabaum’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jonhattan’s picture

For the record. This was changed in #1168812: Respect filesystem permissions to only preserve +x permissions.