1

I need to password protect a single directory on Ubuntu.
1. The folder must be encrypted.
2. Be easily accessed on a regular basis.
3. If possible, the folder should be portable.

How can I achieve this goal?

Thanks.

8
  • What do you mean by portable? Commented Jan 14, 2016 at 18:21
  • Portable, as in I can move it to USB, other machine. But it's not a must.
    – thedp
    Commented Jan 14, 2016 at 18:26
  • Portable to what types of other systems? The first thing that comes to mind is encrypting the folder as a catch-all solution; the encryption key would be required to later unencrypt it and all that would be required on the other machine is the package to do so. How much data will be in this folder?
    – sherrellbc
    Commented Jan 14, 2016 at 18:35
  • Do you need to be portable across operating systems? i.e. do you want to be able to open this on MS Windows? Commented Jan 14, 2016 at 18:38
  • @user2121874 no, just between other Debian based machines.
    – thedp
    Commented Jan 14, 2016 at 23:02

4 Answers 4

1

ecryptfs works very well too. install ecryptfs-utils first

instrucs here for debian, but will apply similarly. https://www.howtoforge.com/tutorial/how-to-encrypt-directories-and-partitions-with-ecryptfs-on-debian/

I have 2 folders encrypted in this way

Pingers.

1

Assuming that it does not need to be portable across operating systems, then this is probably what you are looking for. (DM-Crypt + Loopback File)

It is really trivial to create mount and unmount scripts for this kind of setup, that way you don't need to memorize all the steps to bring the encrypted folder online. Just make sure to remember to copy the scripts as well if you want to move the folder to another system.

If you really do need portability across Operating Systems, then TrueCrypt v7.1.a is what you are looking for. Make sure you get it from the verified mirror on GitHub, or you might be installing a Trojan. The reason why I don't recommend using this unless you absolutely need portability across Operating Systems is that there is still some question as to whether or not TrueCrypt has been broken by the Feds.

0

The venerable TrueCrypt has versions for most OS's, including Linux distros and Windows. It is simple to create a folder as a TrueCrypt container. Caveat: questions were rised about the trustworthiness of that encryption, and VeraCrypt might be an alternative, though I have seen no independent audit of VeraCrypt yet.

Another choice is simply to archive the folder with 7-Zip or PeaZip and use a password. Again, these applications are available for many OS's.

3
0

EncFS is a good non-container (not a fixed size like TrueCrypt or dm-crypt/LUKS) variable size folder/file encryption system. It's available on any Debian system too.

Similar to eCryptFS, but EncFS keeps it's config file inside the encrypted folder and can be mounted rather "portably" and easily, whereas eCryptFS would require knowing the mount options or copying some extra config files to special folders before mounting.

Also EncFS does not need root privileges to run (like eCryptFS does), so EncFS is more "portable" running as a regular user only.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .