Recommend a package for password-protected archiving


I am looking for a package to install (preferably with GUI) to manage archives. I need to protect files, including filename lists, with a password. For some reason, the default program by GNOME, Archive Manager, only allows to encrypt with .zip, which does not encrypt file names. It would be great to find something that creates .7z archives, which I am used to.

Directions will be very appreciated.

I usually use 7z on the command line (package p7zip). For a GUI, try xarchiver.

1 Like

Historically, upstream 7zip, despite being an open source project, did not have Linux support. Apparently as of 2021 or so, experimental support was added.

The commonly used p7zip is a quick’n’dirty port not maintained upstream, so was never really itended to be promoted by something like GNOME, and compatibility with 7zip probably wasn’t guaranteed, especially since it isn’t very maintained.

rar is proprietary, so the only real option that sees widespread use is zip (not tar, since that’s not really used outside unix land, and anyway less featureful and therefore less usable for GNOME’s target audience).

This, coupled with decades of self-perpetuating status-quo, is probably why that’s the default in GNOME today.

1 Like

Sorry for replying this much later.

The commonly used p7zip is a quick’n’dirty port not maintained upstream

What are the implied potential problems of this? Is it quick and dirty in its implementation or in use (I understand quick and dirty in use means there is an alternative with the same end result that takes more knowledge to use)?

File Roller does actually support the official 7-Zip program (_7zz package in Nixpkgs) since 43.0. If you install it, you can create fully encrypted archives. But looks like reading them is currently broken. Will try to look into it. Edit: Looks like it works in the master branch of file-roller.

1 Like

Afaict it was mostly directly ported as a fork and just never accepted upstream, so I’d call that implementation by your definition. I forget where I have that from though. You use it like any command line tool, how you style your usage of it from there is up to you.

Its history seems interesting, actually, looks like what is packaged (as p7zip) on most distros is a fork from 2019, since the original stopped being maintained in 2016 - which is probably around when I last looked at where the source actually is. That fork also looks unmaintained as of 2021, but I figure that’s when upstream started thinking about Linux support.

Either way, I still think GNOME probably doesn’t have it set as the “default” despite being technically better for interoperability reasons as well as historically spotty maintenance. Maybe that will change, I don’t doubt File Roller actually has built-in but non-default support for 7zip.

1 Like

Look, for transparency, I haven’t used these tools in quite a while, but… back in the day when writable DVD’s were the backup medium of choice, I did a lot of investigation into file formats for this kind of thing.

I settled on:

dar still seems to be somewhat active, par2 less so but will still work, so roughly 20 years later, I feel like these weren’t bad choices at the time.

There is a gui for dar, Gdar Gdar · A graphical user interface to browse and extract dar archives · peckto though it doesn’t seem to be in nixpkgs,

1 Like

I usually use 7z on the command line (package p7zip).

This almost works for me, the problem is the way I can specify the password for a new archive. The only way I found is $ 7z a -p<password> -mhe=on -t7z <newArchiveName>, so I have to paste/type the password in the terminal, which is terrible. Any way to make it request the password in a non-echoed way, like it does to decrypt an archive? Inserting the password into the -p flag not only shows it on the screen, but also makes it readable from terminal history.

Edit, solution found: 7z does not echo the password if you leave the -p switch empty, making 7z request for it before encryption.