tools.unzip() doesn't retain permissions stored in file
See original GitHub issueunzip a file with tools.unzip()
that has executable bits and they will be removed.
this works with external unzip binary.
There seems to be a bit of manual intervention needed for the ZipFile module: http://stackoverflow.com/questions/3007233/preserve-file-attributes-in-zipfile
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Python zipfile removes execute permissions from binaries
The easiest way to solve this is by subclassing ZipFile and changing extract() (or patching in an extended version. By default it is:...
Read more >Unzipping file whilst getting correct permissions? - Super User
Usually, the Unix unzip restores file permissions. It may be that the ZIP file has been created without file permissions stored (probably with ......
Read more >Give permissions to files and folders in Windows 10
The Program Files folder is set to the Trusted Installer group and the Administrator doesn't have the rights to change anything. So now...
Read more >When I extract a zip file on my hosted server the permissions ...
Now it works fine when I open it in a browser, thanks. I read somewhere that 7z doesn't preserve permissions, so that was...
Read more >How to Fix File and Folder Permissions Error in WordPress
In most cases, WordPress will try to warn you that it can't edit a file, create a folder, or cannot write to disk....
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 Free
Top 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
Hi @memsharded Thanks for the quick answer. I will open a new issue and add a stripped down zip-file, but probably tomorrow.
Hi again @nussbrot
Could you please open it in a new issue, and give the feedback there? I prefer not to mess with this one, that was closed a long time ago. Thanks!