10

I am a bit unsure about how ubuntus encrypted home folder works compared to a truecrypt partition (which is what I have used before). When I am logged in, will other users on my computer be able to access the files in my encrypted home folder?

2 Answers 2

12

If you enable Ubuntu's Home Directory Encryption, your $HOME directory will have permissions 700 (rwx------) when its mounted, and permissions 500 (r-x------) when it's not mounted. This meaning that you are the only non-root user who will be able to read/write/browse your home directory when its mounted. And when it's not mounted, you'll be able to read/browse, but not modify the contents of your home directory. This is intended to prevent you from inadvertently writing unencrypted data to your home directory.

This is in contrast to the default Ubuntu Home Directory permissions, which are 755 (rwxr-xr-x). That permission allows any local user on the system to read and browse your home directory. This default was chosen for Ubuntu long, long ago in the interest of "sharing" and "openness".

These are called Discretionary Access Controls (DAC), and come from the earliest days of UNIX itself.

The root user (perhaps via sudo as you mentioned above), is privileged in a way that allows them access to any file or directory, regardless of the DAC permissions in place. That means that yes, while your home directory is mounted, the root user is able to browse your home directory.

However, when your home directory is not mounted, the root user would need your login passphrase (or, more specifically, your randomly generated mount passphrase) in order to mount and decrypt your data.

In general, the encrypted filesystem that we use (eCryptfs) is intended to protect your data at rest on the hard drive, rather than protect you from your own root user.

Full disclosure: I am the author of Ubuntu's Encrypted Home Directory feature, and the current maintainer of eCryptfs.

1
  • 1
    Great! Thanks for the explanation of the thoughts behind the system. I have been wondering why the default permissions are 755.
    – Leo
    Feb 24, 2012 at 16:42
2

In principle they can, but the default permissions on the home directory (rwxr-x---) forbids that.

1
  • So, if the other users have root (sudo) access?
    – ams
    Nov 25, 2011 at 14:27

You must log in to answer this question.

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