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

encfs reversewrite mode with MAXPATH files causing sync software to loop #667

Open
axet opened this issue Aug 20, 2023 · 1 comment
Open

Comments

@axet
Copy link

axet commented Aug 20, 2023

Hello!

Using encfs in reversewrite mode causing sync (yandexdisk) software to loop on reading directory when filename is very long.

Basically need to create:

touch "~/encfs/private/notes-html/Все об оперативной памяти — гайд и тесты в разных режимах работы _ Оперативная память _ Блог _ Клуб DNS.html"

then

encfs --reversewrite ~encfs ~/encrypted

sync software will stuck with fuse debug mode showing a lot of infinite messages "unique 3333333 opcode: READDIR nodeid:332134123" keep repeating this line forever. with 100% cpu load booth encfs and sync software.

@Keisial
Copy link
Contributor

Keisial commented Jan 7, 2025

The filename "Все об оперативной памяти — гайд и тесты в разных режимах работы _ Оперативная память _ Блог _ Клуб DNS.html" has 187 bytes (to represent 108 characters)

On a test filesystem, that is encrypting for me as yYLTcxx6yMnhuFtoBxT6DPXeKVqAtAyRmy,4MY0QwvI5aPpaj82oJjM43tsPoaeWzYB2khNZautSEt-YvZthiajkz0XABALF33mXvAmzPqbWXKJ,,2DS9Qfevx,9ucGuMjqYo4h,oye3Ynsi90UkfhclkommJLETRMo-D5S,A4Wt6bu2PHNEl19Q3n7,jY2oT-mfoFRfFVT2VIfCZIpFZ0X--A8DK81b9Fx3NVOcfXn0l5H61E7e6dcR16,xp5X3s20
which is 260 characters. I suspect yandex is getting stuck when finding a filename with more than 255 bytes, which is the limit of most filesystems. Still, this is a bug in yandexdisk, not in encfs.

You can change filename encoding to stream, in which case it uses shorter filenames. For example this one becomes for me Wd,m6N2ffRQtmH8YZqrpPuxI142h3HCMMnEpGsk6gSiRI34JHgVSXUGy0LaQvR,Yg1WoTb6hdWLpGlq0boflrHpSmtvLbqwCGUNqaGPkYADq8Sr9S47nmoEMBfexUo9vMfsVTciAAEYPTvYqFj9fYTPwVmTRLYqTnvmCWuHzATZ4dYjU2MoMM75qU6Zm-p5bLBNeAEV6AAm3Me,5zwA62Xx,dCpUjZwmnoQWbJmx,h5quEJiql7RJM8y6djd, a "mere" 252 bytes.

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

No branches or pull requests

2 participants