Menu

#2392 Regression: after updating from 7-zip 19.00 to 22.01, uncompressing files with symlinks on Windows fail

None
open-later
nobody
None
5
2023-10-03
2023-05-26
clbri
No

When uncompressing a file with symlinks on 7-zip 19.00 on Windows, there were no errors presented. Granted, any symlinks that existed in the archive were uncompressed incorrectly.

Now after updating to 7-zip 22.01, I am getting errors about not being an admin:

ERROR: Cannot create symbolic link : A required privilege is not held by the client. : .\llvm\clang
ERROR: Cannot create symbolic link : A required privilege is not held by the client. : .\llvm\clang++
ERROR: Cannot create symbolic link : A required privilege is not held by the client. : .\llvm\llvm-ranlib
ERROR: Cannot create symbolic link : A required privilege is not held by the client. : .\llvm\llvm-strip
ERROR: Cannot create symbolic link : A required privilege is not held by the client. : .\llvm\wasm-ld

and the uncompress step fails with an error return code.

In our use case, we are uncompressing an artifact file on Windows that was shared for use on Windows, Linux and macOS, and did contain symlinks, but at the same time, these symlinks were never used on Windows, so for the purposes of our use case, 7-zip 19.00 behavior was alright.

Now after updating to 7-zip 22.01, we have an issue that it is no longer uncompressing this artifact file without errors, which is throwing off automated uncompression scripts.

It is great that 7-zip improved the symlink behavior on Windows, but at the same time, we find struggling with this improvement, and it's causing issues to our scenario.

I wonder if it would make 7-zip more robust if it had the following set of command line options:

  • "create hard file copies of symlinks", which would always deep copy any symlinks that it finds during uncompressing, even on Linux and macOS,
  • "create hard file copies of symlinks if no permission available to create symlinks", which would on Windows not produce an error, but would create a deep copy of the file if user is not running as an admin.
  • "skip uncompression of symlinks": which would not attempt to uncompress any symlink files at all (and hence would not generate errors on them).

These kinds of options would help users decide how to behave on different symlink scenarios.

Discussion

  • Igor Pavlov

    Igor Pavlov - 2023-05-26
    • status: open --> open-later
    • Group: -->
     
  • Rainer Bielefeld

    Seems I also suffer from this problem:

    STR with 7z version 23.01 on WIN 10:

    1. Download this KANBOARD Customizer Plugin "Customizer-1.14.2.zip"
    2. Open download folder
    3. ˋrightclick Customizer-1.14.2.zip → 7-Zip → Extract to folder ... → Clickˊ
      » Expected: Unzips completely
      Actual: Error Messages 😥
     

Log in to post a comment.

MongoDB Logo MongoDB