.ecryptfs files recovered with PhotoRec. How do I use them?

Using PhotoRec to recover lost data
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
ambivalent
Posts: 3
Joined: 13 Sep 2012, 08:52

.ecryptfs files recovered with PhotoRec. How do I use them?

#1 Post by ambivalent »

Hi all,

Usung kubuntu 12.04 on ext4.
I deleted my entire ecryptfs folder containing my encrypted home folder.
The backup I thought I had is unusable.
Disaster.

Running PhotoRec I have recovered the files structure.
But all directories and files are renamed as PhotoRec does.

How would I return these files to the original state, please?

I have found this thread - http://blog.dustinkirkland.com/2011/04/ ... ivate.html - to recover ecryptfs files but how would I apply this to the recovered, renamed PhotoRec files?

TFL.

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: .ecryptfs files recovered with PhotoRec. How do I use th

#2 Post by cgrenier »

Code: Select all

sudo chown -R user:user recup_dir.*
(replace user by your username and your usergroup) so you own all the recovered files.

Move all .eCryptfs files to your .Private directory

Code: Select all

mkdir ~/.Private; mv recup_dir.*/*.eCryptfs ~/.Private
Access your data using

Code: Select all

sudo ecryptfs-recover-private

ambivalent
Posts: 3
Joined: 13 Sep 2012, 08:52

Re: .ecryptfs files recovered with PhotoRec. How do I use th

#3 Post by ambivalent »

Hi cgrenier,

Thanks for your post.
I have followed your advice and have a bunch of ecryptfs directories and files under /tmp.

I'm not sure what to do with these though.

To explain my problem further...

Following this;
https://help.ubuntu.com/community/Encry ... tory_Setup
I removed all ecryptfs directories and files using;
$ rm -rf ~/Private ~/.Private ~/.ecryptfs

Dumb dumb dumb. :oops: :oops: :oops:

So... that means I have no;
home/.ecryptfs/USER/.ecryptfs directory and so none fo the files therein.

(The backup I thought I had is useless.)

Can I recover my files without this directory?

Thanks very much.

ambivalent
Posts: 3
Joined: 13 Sep 2012, 08:52

Re: .ecryptfs files recovered with PhotoRec. How do I use th

#4 Post by ambivalent »

Would 'home/.ecryptfs/USER/.ecryptfs' be one of the folders recovered using ;
sudo ecryptfs-recover-private ?

If yes ( I hope so!!!) how do I identify it, and how do I use it, please?

Thanks.

DSpider
Posts: 23
Joined: 29 Jul 2013, 10:41

Re: .ecryptfs files recovered with PhotoRec. How do I use th

#5 Post by DSpider »

Hi ambivalent ,

I have i similar problem, could you find a way to read or decrypt .ecryptfs files ??

Locked