Skip to contentSkip to conversation

ecryptfs on sub-directory?

DISCUSSION Leam Hall 2 participants 2 messages Jun 21, 2013 Ecrypt file system

lore
Share & tools
lore

Leam Hall

author
#0 lore raw

Hey all, sorry for the newbie question. I didn't find the answer in the docs I found.

If I mount a filessystem on Linux, say /dev/sda4 as /opt, and create a directory under /opt; like /opt/backup. Can I use ecryptfs to mount /opt/backup onto itself so that just that portion of the file system is encrypted?

Thanks!

Leam

#1 lore raw
Quoted 7 lines · Leam Hall

Hey all, sorry for the newbie question. I didn't find the answer in the docs I found.

If I mount a filessystem on Linux, say /dev/sda4 as /opt, and create a directory under /opt; like /opt/backup. Can I use ecryptfs to mount /opt/backup onto itself so that just that portion of the file system is encrypted?

The impression that I get is that encrypting only part of the filesystem is one of the primary use cases of ecryptfs. (For example, if you have a single file system for / but want to have an encrypted home directory.)

You may want to consider whether it is preferable to have separate lower and upper mount points, e.g. /opt/backup and /opt/.backup_encrypted or some such. That way, if /opt is mounted and /opt/backup isn't, you don't accidentally clobber or try to use the encrypted backing files.

--
Best regards,

Michael Chang