ecryptfs-recover-private mounts home directory instead of specified directory

Bug #1004106 reported by Karl-Philipp Richter
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
eCryptfs
New
Low
Dustin Kirkland 

Bug Description

ecryptfs-recover-private mounts home directory instead of specified directory if I call <code>sudo ecryptfs-recover-private /media/uuidofmedia/home/user/.Private</code> and enter the user login passphrase. If I enter the mount passphrase it mounts the encrypted file at a tmp directory. If I call the same command again undefined behavior occurs, i.e. the old tmp directory is unmounted or only visible for super/root user anymore. Unmounting the tmp directory explicitly doesn't change this. This is all very strange and should at least be described in the man page (e.g. "If you execute this command several times undefined behavior will occur") or be fixed :)
Version of ecryptfs-utils is 96-0ubuntu3 running on Ubuntu 12.04.
ecryptfs-recover-private doesn't seem to have a possiblity to find out version.

Revision history for this message
Tyler Hicks (tyhicks) wrote :

Dustin - Can you please take a look at this?

Changed in ecryptfs:
assignee: nobody → Dustin Kirkland (kirkland)
importance: Undecided → Low
Revision history for this message
Tom Walsh (ymmothslaw) wrote :

I think that this is an issue with symbolic links. I noticed the same problem as Karl-Philipp (geck creator), when I was trying to move home-directory data from an old installation to a new installation. I booted up into the new installation, then I mounted the partition of the old installation, then I tried to use ecrypt-recover-private to mount my old home directory from the old installation. I was surprised to find that it mounted my new home directory from the new installation.

Closer examination revealed that the file /media/oldpartition/home/tom/.Private was a symlink which pointed to /home/.ecryptfs/tom/.Private. Well, when I'm booted into the new installation, that link points to my NEW home directory, not my old one.

I was able to mount my old home directory after all, by pointing ecrypt-recover-private to /media/oldpartition/home/.ecryptfs/tom/Private.

This was extremely confusing, though, and I would suspect this would be borderline impossible for a new Linux user to figure out.

I'd suggest an improvement to this utility: if it is asked to recover something that is a symlink that points to a different partition, then check to see if that symlink can be followed if it is "reinterpreted" as if the root represented the root of that partition. So, for example, in my case "/home/.ecryptfs/tom/.Private" would be reinterpreted as "/media/oldpartition/home/.ecryptfs/tom/.Private". If so, then ask the user if that's what they want, or if they really want to follow the link as written.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.