rfjakob / gocryptfs

Encrypted overlay filesystem written in Go

Home Page:https://nuetzlich.net/gocryptfs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decrypt paths?

lechner opened this issue · comments

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

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.

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.

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).