I have an ext4 partition which I use as my home partition. I noticed that by running another Linux system either from the disk or even from LiveCD I am able to mount and inspect the contents of said partition, even if my user is password protected. What should I do in order to protect the contents of my partition unless somebody successfully logs the user to whom it belongs?

Should I encrypt the partition? Would it require changing filesystem and switch to something like Ecryptfs? Is there a way to encrypt my ext4 partition and decrypt it only after a successful login of its owner? Should I use TrueCrypt? If so, how? Note that I am not looking for a way to encrypt my drive, I'm just looking for a way to disallow mounting my home partition by external users (i.e. LiveCD systems). Note also that my Linux and Home partition are separated.


Encryption is your only real option.

Passwords and permissions only work when the running OS respects them. If someone boots up from a flash drive or Live CD/DVD, they can mount and bypass permissions. Or if someone roots your system, there's nothing to stop them from reading or destroying the data on your home partition.

TrueCrypt is certainly a popular option, but it's certainly not the only one available on Linux.

Other keywords to look into are loop mounts, and full disk encryption.

But you need encryption.

Now note, encryption only prevents someone else from being able to make any sense of your data. It doesn't prevent them from wiping the partition and destroying all your data. That's what offline backups are for.

|improve this answer|||||
  • Yes, that's what I suspected. I do backup and my backup drives are encrypted, however what do you personally suggest to encrypt my home partition? – Piku Jul 15 '11 at 20:42
  • I don't have any particular recommendations for you, sorry. I don't use FDE personally. – afrazier Jul 16 '11 at 0:20

If they are standing in front of the computer, you have already lost control. You still can encrypt the drive, making it unreadable. But if someone has physical access they always can destroy the drive. worse yet, steal it.

If the data on the drive would actually cost you money if handed to someone else, encrypt. For Linux, the standard is "cryptsetup", it's the most tested and can be very fast.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.