This is still a problem on Karmic. Here is an updated reproducer for Karmic. Create monitor_private_dir.sh:
#!/bin/sh
set -e
private="$HOME/.Private"
while true; do
if ! mount | grep -q "$private"; then
echo "$private was unmounted." | ts
ecryptfs-mount-private
fi
sleep 1
done
Then run the monitor:
$ ./bin/monitor_private_dir.sh
Jul 17 07:08:11 /home/jamie/.Private was unmounted.
Jul 17 07:09:07 /home/jamie/.Private was unmounted.
It might take a couple minutes to trigger, but it does trigger fairly easily. I bet increasing the number of concurrent cron jobs will make it hit even faster. This was also done with an encrypted private directory, not encrypted private $HOME, but would theoretically work there too.
This is still a problem on Karmic. Here is an updated reproducer for Karmic. Create monitor_ private_ dir.sh:
#!/bin/sh "$HOME/ .Private" mount-private
set -e
private=
while true; do
if ! mount | grep -q "$private"; then
echo "$private was unmounted." | ts
ecryptfs-
fi
sleep 1
done
Then add to the user's crontab:
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/1 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
*/2 * * * * /bin/ls >/dev/null
Then run the monitor: private_ dir.sh .Private was unmounted. .Private was unmounted.
$ ./bin/monitor_
Jul 17 07:08:11 /home/jamie/
Jul 17 07:09:07 /home/jamie/
It might take a couple minutes to trigger, but it does trigger fairly easily. I bet increasing the number of concurrent cron jobs will make it hit even faster. This was also done with an encrypted private directory, not encrypted private $HOME, but would theoretically work there too.