-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distributables are created with wrong file and directory permissions #97
Comments
I reviewed this issue and the available Phing options and I'm not seeing a solution to this problem at the moment. Actually, I wasn't aware that a ZIP could save permissions at all until I researched this. I thought that was a TAR-only feature. It does seem to be possible though, but unsupported by Phing. We could move to using Also, I don't think the |
@jaswsinc writes...
That's not true; OS X has had those command line utilities for a long time (going back at least 5 years, AFAIK). @jaswsinc writes...
I just did a bunch of research on this as well. Let me share a bit of what I found: There's a note in the Phing API docs for ZipFileSet (which the Phing
This StackOverflow comment says:
Another answer on StackOverflow explains further:
Info-Zip is what is used on OS X:
The Apache Ant ZipFileSet does support file permissions, and also has a note on the
This StackOverflow answer suggests that the solution to this problem is to use an Installer for your target OS, so that you can have the installer set the permissions appropriately after extracting the zip file. Of course in our case, an Installer doesn't make sense, as we're simply distributing a zip file that WordPress then "installs". So long story short, this does appear to be a limitation of Phing, and I suspect it is likely to remain a limitation since support for storing file permissions inside a zip file (and those permissions then being retained when the zip file is extracted) largely depends on the algorithm used by whatever unzip utility is used. Why should we bother with fixing this?Because file permissions are a big deal, and right now Phing generates a zip file with dangerous permissions ( I received a report almost immediately after releasing Comet Cache v160521 that the permissions were wrong. How I suggest we solve thisSince Phing can't do this for us, and since we don't want to revert to running |
Ah. Cool. I see you are right and I was wrong. Good to know. |
Yeah, that would seem logical for any web-based application that is importing plugin ZIP files. It seems like WordPress should be dealing with permissions after extraction. I'm going to run some tests just to see how it handles this. I haven't noticed this being a problem before.
Agreed. |
I noticed that too. Too bad it's not supported in Phing. |
Excellent idea! Love that solution. |
Next Release Changelog:
|
Woohoo! Nice! I confirmed this issue has been fixed as of Phings v160530. 👍 |
The distributables built by Phing for both the Pro and the Lite versions have directory permissions set to 777 (should be 755) and files set to 666 (should be 644).
Reported in wpsharks/comet-cache#773.
The text was updated successfully, but these errors were encountered: