[BUG] Unzipped files have no permission on Linux
See original GitHub issueDescribe 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:
- In a Linux environment, create a ZIP file using
client-zip
- Extract the files
- 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
Desktop (please complete the following information):
- OS: Pop!_OS 20.10 (Ubuntu variant)
- Browser: Chromium
- Version: 89
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for your feedback. I’ll publish the fix as soon as I have a moment of free time.
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.