I am trying to reinstall, but I want to backup my encrypted home first, so I booted up from a live CD, mounted the hard drive, ran sudo ecryptfs-recover-private <home directory here> and it asked for my passphrase. I entered it, said it was successful and mounted it it in "/tmp/ecryptfs.somethingsomething" . I go there, using a root nautilus, and double click on the .desktop entry, and it just spawns a terminal window that instantly vanishes. I checked the readme file and it says that its running ecryptfs-mount-private, so when I run that in terminal myself, it says "ERROR: Encrypted private directory is not setup properly".

I've googled around and cannot find an answer, since it tells you to recover it using ecryptfs-recover-private, but that obviously isn't' working...

  • I'm not sure that's the best way to go about it. How about backing up to another encrypted (USB or internal SATA) drive from your current install? Then after reinstalling you just enter the password and transfer everything back? This is what I do and it works perfectly. Jan 9, 2012 at 10:05
  • I can't even get the drive to mount, so even if i do that i would have to eventually set it up again to auto unlock every time i log in (which i would much rather be done for me), but if i cant even get the drive to mount because ecryptfs-recover-private or ecryptfs-mount-private doesn't work, then either solution wont work....
    – mgrandi
    Jan 9, 2012 at 16:20
  • Guess I'm confused. You said you are 'trying to reinstall, but I want to backup my encrypted home first'. The normal way of doing this is backup=>reinstall=>restore. Did you reinstall before backing up? If yes, you may have lost some or all of your data, depending on your partitioning scheme. If no, what is the exact step in the process you are stuck at? I'd like to help but I don't have a good understanding of the problem. Jan 9, 2012 at 19:55
  • i haven't reinstalled yet. its a very old version of ubuntu that i have been upgrading since and i want to get a fresh install. I have an external 1tb drive that i just want to copy all of my files on my encrypted home directory to, reinstall to my main hard drive , and then copy all my files back over. But i can't seem to access said encrypted files. The guy who wrote ecryptfs says to use the command ecryptfs-recover-private in his blog post here: blog.dustinkirkland.com/2011/04/… , but its not working due to the error i posted originally.
    – mgrandi
    Jan 10, 2012 at 16:20

2 Answers 2


I figured out my problem. I was running the command and giving it my HOME directory, and for some reason it was saying it was successful in mounting it. However, it was lying. Turns out you need to run the command with the .Private folder that each user has, its located in

sudo ecryptfs-mount-private /home/.ecryptfs/<username>/.Private

The command is supposed to recurse and find that folder for you, but I was impatient and gave it my home folder. I'm not sure why it said it was successful when it clearly wasn't, but if you give it that .Private folder, and then enter your login password, it should mount it to a folder inside /tmp/ and you can do whatever else you want to do with the data =)


I did an upgrade from 14.04 to 16.04 and my home directory was encrypted. I managed the recover the files after the installation using a modified version of mgrandi's method.


sudo ecryptfs-recover-private /home/<username>/.Private

It found the wrapped passphrase and prompted for my login password, after providing which it mounted the contents in a /tmp directory where I could see all the files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.