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

Decrypt paths? #84

Closed
lechner opened this issue Feb 27, 2017 · 4 comments
Closed

Decrypt paths? #84

lechner opened this issue Feb 27, 2017 · 4 comments
Labels

Comments

@lechner
Copy link
Contributor

lechner commented Feb 27, 2017

Hi, what's the best way to get the unencrypted filename from an encrypted path (from a log or so)? Thank you!

@rfjakob
Copy link
Owner

rfjakob commented Feb 27, 2017

I added the -ctlsock functionality a while back to do that, however, at the moment you can only ENcrypt paths. Details: bit-team/backintime#644 (comment)
Also, in the contrib folder there is the ctlsock-encrypt.bash example script for how to interact with the control socket.

@rfjakob
Copy link
Owner

rfjakob commented Feb 27, 2017

For a quick solution you can get the inode number of the decrypted file and use find -inum on the encrypted directory. The inode number of encrypted and decrypted files is the same.

@sam-ka
Copy link

sam-ka commented Jun 3, 2022

For those who want a slow but concrete solution to this problem on linux, I recommend find "$2" -inum "$(stat -c '%i' "$1")" , where $1 is the encrypted/decrypted path and $2is the decrypted/encrypted root of the gocryptfs fs (order depends on whether you want to map encrypted paths to decrypted paths or the reverse).

@rfjakob
Copy link
Owner

rfjakob commented Jun 3, 2022

https://github.com/rfjakob/gocryptfs/blob/master/Documentation/MANPAGE-XRAY.md#-decrypt-paths

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