Skip to content
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

Subdirs in zip have wrong file attributes #76

Closed
Noitidart opened this issue Sep 19, 2016 · 15 comments · Fixed by #117
Closed

Subdirs in zip have wrong file attributes #76

Noitidart opened this issue Sep 19, 2016 · 15 comments · Fixed by #117
Labels
🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt

Comments

@Noitidart
Copy link

Noitidart commented Sep 19, 2016

Issuehunt badges

Similar to this topic here - #62

This is still happening to me but only on SUB-directories, I am using v3.2.0 - however what I do differently is my main system is Windows. So I run the gulp script on my Windows system and when I send my zip to others who open it on Ubuntu they see this:

The first level directories are fine, but directories inside those directories are like this.

First level directories are fine:


IssueHunt Summary

jimbly jimbly has been rewarded.

Backers (Total: $40.00)

Submitted pull Requests


Tips

@dsaraswati
Copy link

Is there a proper fix for this?

@Noitidart
Copy link
Author

Thanks @dayanand-saraswati for your comment, I haven't found one yet.

@thanh4890
Copy link

thanh4890 commented Dec 16, 2016

I'm having a similar problem, create a package from Windows and unzip in Ubuntu & Mac OS, but every files and sub-dir cannot be openned due to permission

Mac:

mac-1

Ubuntu:

gulp-zip-error

gulp-zip-error-2

gulp-zip-error-3

It should look like this:

gulp-zip-error-4

@Scritik
Copy link

Scritik commented Jan 26, 2017

Same issue. Any news?

@lfire
Copy link

lfire commented Feb 10, 2017

I have fixed the problem by use gulp-chmod.
pipe(chmod(0o755, 0o755))

@Noitidart
Copy link
Author

@lfire does gulp-chmod work if it's execute on Windows platform?

@lfire
Copy link

lfire commented Feb 11, 2017

@Noitidart yes, but I find another problem.
sindresorhus/gulp-chmod#12

@lfire
Copy link

lfire commented Feb 11, 2017

@Noitidart The problem was solved, and the reason is use the wrong param.
the param is pipe(chmod(0o755, 0o40755)).
the detail please read sindresorhus/gulp-chmod#12
hope to help you.

@Noitidart
Copy link
Author

Thank you very much sir @lfire this is a superb work around till gulp-zip is fixed, thank you very very much!

@yikuo123
Copy link

the same issue

@raduserbanescu
Copy link

Ran into this problem the past week. Here is an update of the current state of this problem.

In my opinion the underlaying issue is not with any of these npm packages, nor with Node.js itself. gulp-zip merely creates explicit directory entries in the zip file, copying their permissions.

yazl, the actual package used to compress, always makes UNIX like archives. Other Windows archivers (like 7-Zip) make FAT archives witch avoid problems with permissions. See: yazl docs and this
answer here.

Unlike Linux, Windows doesn't require that directories be executable in order to allow access.

  • Default stat raw mode (reported by Node) for directories on Windows is 0o40666 (octal).
  • Default stat raw mode (reported by Node) for directories on Linux is 0o40755 (octal).

This comment explains it very well. @lfire's solution and this one work very well for the moment.

One solution, if @sindresorhus agrees, is for this package to check if running on Windows and make sure a directory has execution permission before adding it to the archive.

@nk-o
Copy link

nk-o commented Sep 5, 2017

The same problem. Moved to https://github.com/joaomoreno/gulp-vinyl-zip since this issue still not resolved.

@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label Jun 9, 2019
@IssueHuntBot
Copy link

@issuehunt has funded $40.00 to this issue.


@Cristy94
Copy link

This is breaking issue for gulp-zip when developing on Windows. Is there at least a work-around until a fix is released?

@issuehunt-oss
Copy link

issuehunt-oss bot commented Jun 27, 2020

@sindresorhus has rewarded $36.00 to @jimbly. See it on IssueHunt

  • 💰 Total deposit: $40.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $4.00

@issuehunt-oss issuehunt-oss bot added 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt and removed 💵 Funded on Issuehunt This issue has been funded on Issuehunt labels Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants