Finding corresponding encrypted file on encfs
Asked Answered
B

2

8

Hopefully a very simple question.

I have a read-only mount, and a encfs FUSE mount reads over that to decrypt the files. How do I know which encrypted file each decrypted file relates to?

For example: I want to delete a file, however won't be able to do that via the read-only filesystem. How do I know the true filename?

I am possibly looking for a more programmatic way of doing this

Branton answered 8/7, 2015 at 20:13 Comment(0)
B
16

I found this is possible encfsctl. You can use encode function to turn the human readable name into the real path on the filesystem.

$ ENCFS6_CONFIG='encfs6.xml' encfsctl encode /encfs/mountpoint readable/name/in/mountpoint
EncFS Password: 
decryptedname

http://manpages.ubuntu.com/manpages/hardy/man1/encfsctl.1.html

Branton answered 15/7, 2015 at 13:43 Comment(1)
Note: This also works in the other direction with decode. The ENCFS6_CONFIG=... part is optional.Dealt
B
2

I found a solution I am not amazingly happy with. I can make up two directories encrypted and decrypted and use the same .encfs6.xml file to mount the decrypted/ directory as the encfs mountpoint.

I can then mkdir -p decrypted/parent/of/file and touch the filename. Then if I check in decrypted I will have the full path of the encrypted file I want.

It's not elegant but it's a solution. Does anyone have any better ideas?

Branton answered 8/7, 2015 at 20:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.