I frequently get "access denied, please remove write protection" messages when adding files to existing zip files.
If I wait for a while, usually these errors go away.
Can anyone suggest a method of tracking down the reason for these errors.
cheers
Derek
Adding files to zip files using internal packer
Moderators: Hacker, petermad, Stefan2, white
-
- Power Member
- Posts: 872
- Joined: 2013-09-04, 14:07 UTC
It sounds like a process has the ZIP archive open for a while, preventing any other program from writing to the file. Such a process could be something like a virus scanner scanning the content of the ZIP archive, perhaps.
You could use SysInternals ProcessExplorer (https://technet.microsoft.com/en-us/sysinternals/processexplorer) or the "Handle" command line tool (https://technet.microsoft.com/en-us/sysinternals/handle.aspx) to list all processes which have/keep a specific file open.
Note that you would need to execute Handle.exe or ProcessExplorers handle search at the moment when you get such an "access denied" error, as both will only lists open file handles existing at that moment.
You could use SysInternals ProcessExplorer (https://technet.microsoft.com/en-us/sysinternals/processexplorer) or the "Handle" command line tool (https://technet.microsoft.com/en-us/sysinternals/handle.aspx) to list all processes which have/keep a specific file open.
Note that you would need to execute Handle.exe or ProcessExplorers handle search at the moment when you get such an "access denied" error, as both will only lists open file handles existing at that moment.
-
- Power Member
- Posts: 872
- Joined: 2013-09-04, 14:07 UTC
Oh, in case you use Handle.exe, i forgot to mention that you should run it with admin privileges. Otherwise it will list only processes running with your restricted user account credentials.
With regard to ProcessExplorer and the sharing violation, i have unfortunately no idea what causes it. But some years ago, Mark Russinovich and Bryce Cogswell from SysInternals/Wininternals fame encountered and analyzed a problem involving ZIP files, a sharing violation and an eTrust anti-virus program (inort). Although chances are pretty good that your problem is not exactly comparable to that case, if you need some reading for the loo you can find Marks write-up here: https://blogs.technet.microsoft.com/markrussinovich/2007/08/06/the-case-of-the-failed-file-compression/
With regard to ProcessExplorer and the sharing violation, i have unfortunately no idea what causes it. But some years ago, Mark Russinovich and Bryce Cogswell from SysInternals/Wininternals fame encountered and analyzed a problem involving ZIP files, a sharing violation and an eTrust anti-virus program (inort). Although chances are pretty good that your problem is not exactly comparable to that case, if you need some reading for the loo you can find Marks write-up here: https://blogs.technet.microsoft.com/markrussinovich/2007/08/06/the-case-of-the-failed-file-compression/