I have a daemon program who need to read in a file who is saved somewhere in my home folder.

But every time I close my ssh connection, this daemon can't read the file because it appear that eCryptfs unmount the home.

Maybe there is an option to force eCryptfs to not only mount with an ssh connection ? I didn't found it.


PS : I know this thread, https://askubuntu.com/questions/165608/why-is-ecryptfs-only-mounting-private-home-directory-over-ssh, but this is not the proper/good way to deal with the request.

1 Answer 1


Remove auto-umount file from ~/.ecryptfs/ - each time you will need to umount your private directory manually. The other option is to keep your ssh session running using screen or tmux.

More info on ecryptfs Ubuntu

  • You mean : - keeping an ssh session on localhost inside screen ? Yes that should work. - removing auto-unmount still keep the system secure ?
    – Bebeoix
    Nov 10, 2012 at 13:09
  • Well, that depends on what kind of security you need. Generally it's always better to umount the directory when you're not using it.
    Nov 10, 2012 at 13:48
  • Ok and if I want the feature back, I just to re create a simple file "auto-umount" ?
    – Bebeoix
    Nov 10, 2012 at 15:12
  • 1
    Yes, just create an empty file: touch ~/.ecryptfs/auto-umount
    Nov 10, 2012 at 15:34
  • or in ubuntu /home/.ecryptfs/{USER}/.ecryptfs/ . Same for auto-mount
    – heralight
    Mar 6, 2017 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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