Sunday, 19 May 2013

How can I recover files that ecryptfs seems to have lost?

How can I recover files that ecryptfs seems to have lost?

I'm having a really strange problem with ecryptfs. I run openSUSE 12.3 with Gnome 3.8 and ecryptfs (as well as LUKS full-disk encryption over an LVM that contains / and /swap). I often leave my computer running and ssh into it from another computer, and use ecryptfs so that the files on the computer are somewhat secured while I'm not accessing them.
Yesterday, I successfully sshed into my computer. When I tried to run ecryptfs-mount-private, however, I got an error message about .Xauthority (unfortunately, I didn't write down what the exact message was). Running ls after that just showed a list of ecryptfs-encrypted files -- i.e., my files had not been successfully decrypted. Running ecryptfs-mount-private again did not work (I was met with an error message that stated that the private folder was not correctly set up). Running ecryptfs-umount-private also gave me a similar error message.
This had happened once before, about four weeks ago. At that point, I ran su -c 'shutdown now' through ssh and then rebooted the computer physically the next day. At that point, I found that all of my files were fine, and didn't get any more error messages from ecryptfs.
This time, though, instead of rebooting the computer, I went and logged in to the physical machine. I'm now not sure what's happened: ecryptfs has apparently decrypted only some of my files, such that some of my /home/$USER-level folders are present, but my ~/Desktop, ~/Documents, etc. folders are all (incorrectly) empty. In addition, although my ~/.alias file is untouched (thus, my custom bash aliases work), Gnome 3 has reset its theme options as if for a new user. seahorse shows that all of my GPG keys are still present, but none of my scripts (located in ~/Desktop) that use them seem to be present. Firefox is still logged in to websites from before this problem started and thus has not had its cache overwritten. None of the files that I had downloaded to ~/Downloads are present, though.
Disk Usage Analyzer indicates that my user's home (~) folder is smaller than it would be if it contained the files that should be there. However, the full hard drive seems to be full enough to indicate that the files may still be residing somewhere.
I also tried running ecryptfs-recover-private from the root account (with my normal user account logged out) and just got a series of messages stating that various files that it was looking for (these were system files, not files within my home folder) do 'not exist' (if anyone thinks that that list of files is important, I can re-run the command and post the output here).
Does anyone have any ideas about this? I would be grateful for any help!
P.S. I would also like to mention that, although this may seem like a question whose answer would benefit only a limited number of users, the fact that the error message that preceded this situation has happened twice on my system suggests to me that it may not be a completely isolated problem. Also, ecryptfs was involved in a similar problem that I had twice a year ago, when I was running Ubuntu 12.04, after receiving an error message about .ICEauthority. This further suggesting to me that having an answer here might prove helpful to a wider group of users in the future. Thank you!

No comments:

Post a Comment