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

Rules regarding maximum filename length are confusing, documentation could be improved #183

Closed
afiskon opened this issue Jun 27, 2016 · 7 comments · Fixed by #506
Closed

Comments

@afiskon
Copy link

afiskon commented Jun 27, 2016

Hello.

Recently I faced a strange problem with EncFS. You can find all the details here:

syncthing/syncthing#3338
syncthing/syncthing#3355

Long story short - according to encfs man page it should handle file names up to "approximately" 189 characters since underlying ext4 FS handles up to 255 characters (formula: 3*(N-2)/4). But in practice I couldn't create a file with name containing 145 characters. Syncthing developers and I couldn't figure out why.

I believe it's because by file name you mean absolute file name, but I'm not sure about it and it's not clear from the documentation. Perhaps you could give more details on what are limits on maximum file name length and absolute file name length.

@rfjakob
Copy link
Collaborator

rfjakob commented Jul 22, 2016

The limit is 176 characters and I will fix up the man page.

@veeara282
Copy link

Is it because filenames are encoded in Base64? It would help if the man page stated that.

@wwp
Copy link

wwp commented Dec 7, 2018

Here I can create file with 175-byte name, not 176. Is this intended? Using fuse-encfs-1.9.5-1.el7 on ext4 fs.

@benrubson
Copy link
Contributor

Be sure your filename does not contain special characters :

Based on an underlying filesystem supporting a maximum of 255 characters in
filenames, here is the maximum possible filename length depending on the choosen
encoding scheme : stream (189), block (176), block32 (143). Note that we should
rather talk about bytes, when filenames contain special (multi-bytes) characters.

@wwp
Copy link

wwp commented Dec 7, 2018

It was this file: '0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234'
(without the quotes).
$ echo -n '0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234' | wc -c
175

@rfjakob
Copy link
Collaborator

rfjakob commented Dec 9, 2018

Yep, 175 it is. Looks like I got it right in the table: https://nuetzlich.net/gocryptfs/comparison/#file-names

@benrubson
Copy link
Contributor

see #540 for a man page fix.
I reproduced this case, I also cross-checked the other max length (stream & block32).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants