Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've setup an encrypted homedir according to this EncryptedHomeDirectoryHowto.

To gain ssh access I've added auth required to /etc/pam.d/sshd

$ cat /etc/pam.d/sshd | egrep -v ^#
auth       required # [1]
auth       required envfile=/etc/default/locale
auth       required
@include   common-auth
account    required
@include   common-account
@include   common-session
session    optional # [1]
session    optional standard noenv # [1]
session    required

It does work for a short time after login but after 5-10min the homedir will be unmounted. If I'm logged in locally everything is working fine. Even ssh from an other machine.

It seems like unmount is done everytime cron is starting:


Feb 22 19:01:01 xxxxx sshd[12746]: Accepted password for USER from port 39769 ssh2
Feb 22 19:01:01 xxxxx sshd[12746]: pam_unix(sshd:session): session opened for user USER by (uid=0)
Feb 22 19:05:01 xxxxx CRON[13248]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 22 19:05:01 xxxxx CRON[13248]: pam_unix(cron:session): session closed for user root
share|improve this question
up vote 3 down vote accepted

Check the parameters in /etc/security/pam_encfs.conf. On my system, I see the line

encfs_default --idle=1

which triggers an unmount after the filesystem has been idle for 1 minute with no file open. Set the idle parameter to 0 to disable the automatic unmounting. You may set it in a mount-point-specific line instead of the default if you prefer.

share|improve this answer
Thanks Gilles, that solved the issue – Germar Feb 23 '12 at 2:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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