Ubuntu – How to change the timeout of directories mounted with ecryptfs-mount-private


When I mount my encrypted .Private data, I can access (rw) my data fine. After a while the mount seems to be unmounted automatically. Is there a default timeout? If so, how can I change it? The timeout appears to be fairly short (order of a few minutes) and seems to occur when I try to access the share remotely using rsync (i.e. via ssh).

I didn't find anything when searching for 'time' in the man pages of ecryptfs-mount-private, ecryptfs-setup-private, ecryptfs or ecryptfsd.

Best Answer

  • There is no timeout. I had the same problem and according to David's comment above I commented out pam_ecryptfs from /etc/pam.d/common-auth, /etc/pam.d/common-password, /etc/pam.d/common-session and /etc/pam.d/common-session-noninteractive and it stopped unmounting.

    Actually cron should only be running the last one, but if you don't actually have the same password for your account and the private data (I don't), it's better to remove it from all of them, because additional login, e.g. on console, would also unmount the share.