I need urgent help with file recovery!

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
Dingusxp
Level 1
Level 1
Posts: 4
Joined: Thu Mar 28, 2024 9:49 pm

I need urgent help with file recovery!

Post by Dingusxp »

Hello, I was testing Encfs gnome to encrypt a folder with some txt documents, but it failed so i deleted the encrypted file as it seemed to be a copy of the original one, and wanted to re do it. Then i realized that the folder was gone, I dont think it got encrypted because i could still acess it from my file manager after i had tried to encrypt it.
User avatar
BenTrabetere
Level 7
Level 7
Posts: 1890
Joined: Sat Jul 19, 2014 12:04 am
Location: Hattiesburg, MS USA

Re: I need urgent help with file recovery!

Post by BenTrabetere »

Have you tried to restore it from a recent backup? You do backup your data and personal files on a regular schedule, yes?
Patreon sponsor since August 2022
Image
User avatar
Coggy
Level 5
Level 5
Posts: 642
Joined: Thu Mar 31, 2022 10:34 am

Re: I need urgent help with file recovery!

Post by Coggy »

If you drag/drip a file to a different filesystem (encfs mounts an encrypted filesystem at you chosen folder) then the file is copied, not moved. So the original file remains in place and you need to delete it as a separate action.
This copy instead of move is true any time you drag/drop between two different mounted filesystems. The file manager normally( shows a slightly different cursor shape for the drop (Nemo adds a '+' to the cursor to indicate this, but it's easy to overlook it).

Not sure if that's relevant or not, but it may help understand what happened.
Dingusxp
Level 1
Level 1
Posts: 4
Joined: Thu Mar 28, 2024 9:49 pm

Re: I need urgent help with file recovery!

Post by Dingusxp »

Thanks, fo you have any idea how i can restore it?
User avatar
Coggy
Level 5
Level 5
Posts: 642
Joined: Thu Mar 31, 2022 10:34 am

Re: I need urgent help with file recovery!

Post by Coggy »

I'm not clear what you deleted. Lets establish some terminology:
With encfs there are two directories - the encrypted one that holds the encrypted copies of your files, and the decrypted one that shows the unencrypted versions of the encrypted files. The encrypted files are always there in the encrypted directory. The decrypted files only exist in the decrypted directory after launching encfs and giving the password.

You add files to encfs by copying them to the decrypted directory. This action creates a corresponding encrypted copy in the encrypted directory. If I remember correctly, copying a file to encfs does not automatically delete the original.

As for deleting files:
1: If you delete the original file (this makes sense as you are trying to hide your secret data) then this does not affect encfs, but you are now reliant on encfs being able to decrypt the encrypted version and show it in the decrypted directory.
2: If you delete the decrypted file (visible while encfs is serving decrypted copies) then encfs will delete the corresponding encrypted file. This is how you would normally delete files from encfs.
3: If you delete the encrypted file (which exists whether encfs is running or not) then encfs can no longer decrypt it to show you a decrypted version. I think I remember that even the filenames are encrypted so you can't easily delete a specifically chosen file. You should not do this.
Dingusxp
Level 1
Level 1
Posts: 4
Joined: Thu Mar 28, 2024 9:49 pm

Re: I need urgent help with file recovery!

Post by Dingusxp »

Ok, I think i know what i did, so basically when i was gonna delete the stash from the manager i accidentally ticked the box, "delete stash from the disk". I was pretty tired and a little stressed so i messed up there. What can be done?
Post Reply

Return to “Software & Applications”