How to not automatically unmount eCryptfs

1

2

I am using eCryptfs and I would like to do either/or these things:

  1. Not automatically unmount the private directory when the user logs out 2. Mount another users private directory so I can just use a script and logout (from root possibly).

The reason for this is so I can have Gitolite access the directory when no one is logged in after I mount the filesystem. I may do something similar for www-data.

user3109

Posted 2011-09-26T04:53:54.723

Reputation:

What is the point of keeping public_html inside an ecryptfs filesystem, anyway? – user1686 – 2011-09-26T07:03:55.740

@grawity: I cant think of any reason but i'll still need it for git. I dont even want redmine with git so i probably dont need to bother with www-data and encryption. – None – 2011-09-26T19:34:46.733

Answers

2

delete ~/.ecryptfs/auto_umount. Its an empty file so you can restore it with touch

user3109

Posted 2011-09-26T04:53:54.723

Reputation:

0

According to a user at Ask Ubuntu it’s a known bug. Don’t know if it’s true or not, but I found a workaround.

I added at the end of my .bash_logout (e.g. vim ~/.bash_logout) following line:

(sleep 10; ecryptfs-umount-private) &

When I log out (via ssh connection), I see the message “Sessions still open, not unmounting,” but my home-dir gets unmounted/encrypted anyways.

scotty86

Posted 2011-09-26T04:53:54.723

Reputation: 159