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

Sjon
  • 4,989
  • 6
  • 28
  • 46
Marcus Hughes
  • 5,123
  • 1
  • 25
  • 39

2 Answers2

15

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

Marcus Hughes
  • 5,123
  • 1
  • 25
  • 39
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?

Marcus Hughes
  • 5,123
  • 1
  • 25
  • 39