Menu ▾ ▴

#1702 Feature request: “Lock Archive” (locking of .7z archives)

open
lock (1)
5
2026-10-24
2026-10-24
streik
No

**Subject: ** Feature request: “Lock Archive” (locking of .7z archives)

Dear Igor Pavlov,

First of all, thank you for 7-Zip. It is an excellent tool that I would like to use professionally.

I would like to propose a feature similar to "Lock Archive" in WinRAR (command k / switch -k): the ability to lock a .7z archive, both during its creation and afterwards, so that its contents cannot be modified accidentally later on.

Use case

I make backups that are uploaded to the cloud and downloaded later in order to restore them.
I want 7-Zip, during that cycle, not to allow the contents of the archive to be altered (nor files to be deleted, renamed or added, etc.), not even by mistake on my part nor with knowledge of the password, so that the backup copy remains intact and exactly identical to the original.

Proposed behavior

With the archive locked, 7-Zip should reject:

  • Deleting files or folders.
  • Adding files or folders.
  • Modifying or overwriting existing files.
  • Renaming files or folders.
  • Any other operation that modifies the contents of the archive.

And it should still allow:

  • Opening the archive and viewing its contents.
  • Extracting files and folders.
  • Verifying its integrity (Test).

Technical requirements

  1. The lock must be stored inside the .7z archive itself (for example, as a flag in the header), without depending on the file system’s “Read-only” attribute.

  2. It must be preserved when the archive is copied, moved, uploaded to the cloud or downloaded afterwards.

  3. It must be possible to enable it both when creating the archive and after it has been created, from the graphical interface and from the command line (for example, using a -k switch and a k command, as in WinRAR), so that it can easily be integrated into scripts and automated backup programs.

  4. If an attempt is made to modify a locked archive, 7-Zip should display a clear message indicating that the archive is locked and reject the operation without making any changes.
    When opened in the graphical interface, the modification options (such as “Delete” for any file inside) should already appear disabled.

  5. Once the lock is enabled, 7-Zip should not allow it to be disabled, following the behavior of WinRAR’s Lock Archive.
    That is, a locked archive could not be modified internally with 7-Zip, even with knowledge of the password, if it has one.

Scope

This is not about implementing cryptographic protection against deliberate tampering, but rather about preventing accidental or unwanted modifications of archives, especially in automated backups.

I believe this feature would be a very valuable improvement for 7-Zip, especially in professional environments where it is important to keep backups intact once they have been made.

Thank you very much for your time, for your excellent work and for considering this proposal.

Sincerely,

Streik

Discussion


Log in to post a comment.