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.

tools.unzip() doesn't retain permissions stored in file

See original GitHub issue

unzip 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:closed
  • Created 7 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
nussbrotcommented, Feb 26, 2019

Hi @memsharded Thanks for the quick answer. I will open a new issue and add a stripped down zip-file, but probably tomorrow.

0reactions
memshardedcommented, Feb 26, 2019

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!

Read more comments on GitHub >

github_iconTop 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 >

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