Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't access the contents of my encrypted files #816

Closed
kulitnov852 opened this issue Jan 10, 2024 · 3 comments
Closed

I can't access the contents of my encrypted files #816

kulitnov852 opened this issue Jan 10, 2024 · 3 comments
Labels

Comments

@kulitnov852
Copy link

I encrypted a set of folders all containing files. I don't remember exactly if I checked all the encrypted files afterwards, but I deleted the non-encrypted files (the original files). Now I've noticed that the folders are there, the files are there, but when I open them they look empty.

The weirdest thing is that the size of the files seems a bit correct/accurate (because I've seen the names of my files (and again the type)). File sizes are not 0 bytes.

@kulitnov852
Copy link
Author

kulitnov852 commented Jan 10, 2024

I've just noticed in the terminal after entering the command gocryptfs -fsck that a good number of my files are corrupt.

Ex :

...
doRead 807703: corrupt block re: stupidgen: message authentication failed
doRead 807703: corrupt block re: stupidgen: message authentication failed
fsck: error reading file "screenshot-2022-02-01 20.05.12.312.png" (inum 807703): read /tmp/gocryptfs.fsck.793716487/screenshot-2022-02-01_20.05 12.312.png: input/output error
fscheck summary: 72 corrupt, 0 files skipped

Is there any way of recovering them?

@yahesh
Copy link
Contributor

yahesh commented Feb 23, 2024

@kulitnov852 You could try to use the -forcedecode option with a gocryptfs version older than 2.2 when mounting the folder. This might still lead to corrupted data in the files but at least you should be able to access them by ignoring the integrity check failures.

@rfjakob
Copy link
Owner

rfjakob commented Mar 12, 2024

You can use dd_rescue to recover the non-corrupt parts of the files. I would recommend this over using -forcedecode, but both are possible.

But something like this does not happen, usually. Where do you store the encrypted files? Some cloud filesystem / sync software?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants