If I have selected a good password and kept it secret, what is the point of encrypting my home directory, as a setup option with some flavors of Linux offer during setup?
Won't the Linux permissions keep unwanted eyes away from my stuff?
If I have selected a good password and kept it secret, what is the point of encrypting my home directory, as a setup option with some flavors of Linux offer during setup?
Won't the Linux permissions keep unwanted eyes away from my stuff?
The point is to protect against your disk being accessed outside of the OS.
Encryption is useful against attackers who have physical access to your computer. Without it, it would be trivial to read out the content of your home directory, for example by plugging in a live boot USB stick.
The Linux permissions only work on your own system. If you take the disk and put it in another computer, or just boot another OS on the same computer that can read your Linux partition you will plainly see that the permissions do not prevent you from accessing the content of your home directory.
In addition to answers, there are a few minor caveats that one must keep in mind about these encrypted configurations.
When you are not logged into your system, data in your home directory is not accessible in plain text. This, of course, is by design. This is what keeps an attacker from gaining access to your files. However, this means that:
You can put your authorized_keys directly in your unencrypted home directory by following these directions without the need for linking it anywhere else. https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/362427/comments/12
If you are not using full-disk encryption you should utilize home directory encryption. Otherwise anyone with physical access to the computer can do out of os access.
If your attacker with physical access could remove the hard drive, connect to external reader, copy home directory, steal data, put hard drive back in the computer. Depending on what data you've stored in your home directory things can get pretty problematic.
Hope this gave you some insight...
The reason you encrypt your home directory is for security. As mentioned before, there are several pros and cons to encrypting your home directory, it is not something to take lightly. If you are going to the point of encrypting your home directory then you would also make the encryption password different than your login password. Each time the system boots you are asked for two passwords, your login password and your home directory encryption password. In this situation, if your drive or computer are stolen then the thief would not have access to your encrypted home directory. Even booting up the computer with a live system (cdrom/dvd/usb stick) would not allow the thief access to your encrypted home directory. All the thief would see is garbage on your home directory since they would not have the encryption password. Your login password would not help the thief in any way. Hope this helps.
Encrypted home directory on a computer is supposed to be less accessible in the eventuality the computer or some of its parts are stolen or accessed without proper rights.
Encryption can be useful if you need to protect private or confidential information that you store in your home directory.
The answers (notably the one by tim) already answer the question about why you would like to encrypt the home directory. Yet, there is one caveat that no one talked about.
Encrypting only the home directory on Linux is poor security.
Several applications store temporary files in /tmp
and /var/run
(or just /run
which should be a soft link to /var/run
). Therefore, although the home directory is protected, these temporary files are stored in plain text and a competent attacker will look into the temporary files.
/tmp
and /var/run
(and /run
) should be either encrypted as well, or be mounted as tmpfs
(a filesystem in memory, but for this option read the next point).
The swap
is another place that applications may store a file in plain texts. The application will have the file in memory and the kernel may swap out the memory pages that contain the file (which is in plain text in memory). This also will happen with files in a tmpfs
.
If you have anything encrypted on a machine, you should always encrypt the swap as well. Otherwise a competent attacker can scan the swap partition for file signatures an d retrieve complete (or parts of) files in plain text.
If you have full disk encryption (on all disks of the system) these are not concerns.