Symlinks and EncFS

filesystemssymlink

I am trying to secure my Dropbox account by using EncFS. My strategy is as follows:

  • I store all my files in a folder called ~/Public/.
  • The encrypted counterpart of ~/Public/ is ~/Private/.
  • Use EncFS: encfs ~/Private/ ~/Public/

Now the problem is that I'd like to use Dropbox for backing up my dotfiles as well. So I tried symlinking ~/.rc/ (the folder containing my dotfiles) into ~/Public. But EncFS seems to treat the symlink as a file and it shows up in ~/Private as 0 byte file. Any way I can get EncFS to follow symlinks?

Best Answer

Encfs stores what you tell it to store. If you tell it to store a symbolic link, it'll store a symbolic link.

If you want a file to be encrypted, you need to store it on the encrypted filesystem. Creating a symbolic link to the file won't move it.

(If you created two symbolic links to the file, on two different encrypted filesystems, would you expect it to be stored in both? That would be utterly bizarre.)

So move your dotfile directory to the encrypted filesystem, and create a symbolic link to where you want to have a view of these files:

mv ~/.rc ~/Public/
ln -s Public/.rc ~/
Related Question