question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Unzipped files have no permission on Linux

See original GitHub issue

Describe the bug When unzipping a ZIP file created with client-zip (non-service worker version), the resulting zipped files have no permissions in Linux and are therefore locked. Once you change the permissions, the files work as expected.

I tried using a File object and an object literal to represent each file and had the same outcome.

To Reproduce Steps to reproduce the behavior:

  1. In a Linux environment, create a ZIP file using client-zip
  2. Extract the files
  3. Extracted files should have no permissions and possibly display a locked icon over them

Expected behavior I expect the extracted files to have 664 permissions on Linux. This works as expected on Mac and Windows.

Screenshots image

Desktop (please complete the following information):

  • OS: Pop!_OS 20.10 (Ubuntu variant)
  • Browser: Chromium
  • Version: 89

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Touffycommented, Mar 16, 2021

Thanks for your feedback. I’ll publish the fix as soon as I have a moment of free time.

1reaction
Touffycommented, Mar 15, 2021

Thanks for digging. If I understand correctly, it’s not even an extra field, just a few bytes in the basic file header that I thought were not important and was leaving at zero.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to handle permissions of unzipped files? - Ask Ubuntu
Save this answer. The first 7 (4+2+1) gives all permissions to file owner (which you can change using chown command), the second 7...
Read more >
Unzip File: Permission Denied - Super User
Either you try to unzip your archive in a directory where you do not have access rights or the rights on the archive...
Read more >
How to resolve the "Permission Denied" error in Linux
While using Linux, you may encounter the error, “permission denied”. This error occurs when the user does not have the privileges to make...
Read more >
unzipper leaves files with no permissions - Lazarus Forum
I used the Mac's (ie os provided) unzip command on one of the zip archives (created using paszlib), it extracted the files retaining...
Read more >
Permission denied in Linux error handling - Sourcegraph Learn
We'll be using the chmod command to modify permissions of a temporary file to cause the Permission denied error, and then rectify the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found