1

I recently installed Ubuntu with an encrypted home folder. I now have a second drive that I want to use to store my pictures, music, etc. I was thinking of creating a partition on the second drive for each folder on the home directory that I want to use it for (e.g., one partition to mount to ~/Pictures, etc) and then mounting each partition to its corresponding folder. If I do that will the information stored in the folders on the second physical drive be encrypted by virtue of being mounted under the home directory? If not, can I run Ecryptfs on the new partitions so that the encryption works the same as for the home partition (i.e., decrypts at login, etc)? Also, is the best way to accomplish what I'm trying to do?

0

If you're setting up new partitions on the new drive, you'd might as well use encrypted partitions with cryptsetup / LUKS.

eCryptfs and EncFS are for encrypting some folders on a filesystem, LUKS is for encrypting an entire partition. See archwiki for a good overview of different disk encryption systems.

With the new partition(s) encrypted, then you can use any type of link or just a shortcut to the new encrypted partitions, and any data anywhere on the new partitions will be encrypted. You could even have the new partitions automatically mounted when you login (storing the keys in your encrytped home) or mounted at boot, or on-demand.

Don't worry about mixing linked encrypted files and only relying on eCryptfs to carry the encryption to a different drive (which probably won't be encrypted if you only link the decrypted folders anyway) it just sounds like a data leak waiting to happen.

  • That's what I was thinking. I thought maybe since EcryptFS encrypted the home directory it would encrypt anything mounted under the directory, just as it would encrypt any files I later create put in the directory. However, I couldn't find anything that explicitly stated that was the case. Assuming I use LUKS, couldn't I just make one partition for the whole drive, then create a folder for pictures, etc, then use symlinks to connect the corresponding folders in the home directory (e.g. create a symlinks to connect /newPartition/Pictures with /home/username/Pictures)? – bickhaus Jul 10 '16 at 13:18
  • Using one big LUKS partition for personal files is a good idea, symlinks from "home" should work well too, solid plan. With LUKS don't forget to backup the LUKS header, with any encryption backups are important - really with any important files backups are important ;-) – Xen2050 Jul 11 '16 at 5:28
  • Mounting things anywhere (in a host folder) doesn't usually "trickle down" the host folder's mount specifics. You can mount a hard drive / USB / DVD to a folder inside your home, but the folder only shows what's on the hard drive / USB / DVD. – Xen2050 Jul 11 '16 at 5:31

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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