3

Let us imagine I have encrypted my tar file with gpg as we can see here but I want to mount that with archivemount (e.g.: answer) without holding the unencrypted file on disk. Is it possible?

If not, Is there some way to create a encrypted disk image as a file to mount like we can see on EncryptedFilesystems?

1 Answers1

1

No, archivemount can’t do that. It doesn’t support GPG and neither does it support external filters/helpers.

LUKS works perfectly fine with file containers, using losetup and loop devices:

truncate -s 1G container.img
losetup -f # Use output in next commands
losetup /dev/loopX container.img
cryptsetup luksFormat /dev/loopX
cryptsetup luksOpen /dev/loopX mycontainer # ...where “mycontainer” is a free name in /dev/mapper/

Then proceed to create a filesystem and whatnot. When you’ve finished using the container, close it:

cryptsetup luksClose /dev/mapper/mycontainer

And remove the loop device mapping.

losetup -d /dev/loopX
user219095
  • 65,551