Search code examples
encryptionlong-filenames

Is there a workaround for the filename length limit in encfs?


I use Dropbox with encfs. The problem is that my host supports only 256 characters in a filename, hence encfs supports only ~190. Is there a way to circumvent that without reinstall and increase limit for the host filesystem?

I am primarily using ext4 as filesystem in Ubuntu 11.10, but also Mac OSX 10.6 with hfs as filesystem and Windows is not so important for me at this time.

Cheers, Brubel.


Solution

  • I don't think the task would necessarily be easy; it looks to me like the logic you need to work with is NameIO::recodePath(), and it even looks pretty well self-contained. You would need to come up with some other database that lets you create, rename, and delete entries as closely as possible as the standard POSIX filesystem semantics.

    If you don't mind losing the "filenames are unknown without the key" property, you could simply store an SQLite3 database mapping the plaintext long names with the "ciphertext" shorter names -- maybe just counter-based names, or hash the names, etc.