-
Notifications
You must be signed in to change notification settings - Fork 815
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
sync error: File name too long #467
Comments
This happens to me as well. In file synced from a windows client, does not sync in Linux, ecryptfs, ext4 client. |
I also tried to sync a folder encrypted using gocryptfs, and some files fail to sync because of "File name too long" Edit: |
Server 17, client 2.6 windows. Filename too long
|
same problem but error message is not god. File name is not to long it's just because there is strange caracter just before the file extension. resolution: just rename file by deleting one caracter before the extension (.pdf) |
Ideally, Nextcloud Web interface should not accept file names (when you create/rename) that are too long, that would be an issue in server - anybody know if there is an issue about that already? I only found this but it is slightly different issue nextcloud/server#4046 For the client, there should be a more helpful error message telling the user how to resolve the problem. Ideas:
|
I have the same error: the linux client (v 3.0.2) fails to download files with long file names (in my case 140 chars). If I shorten the names in the web client (NC 19.0.4) they download fine. Also, I can create files with such long names (or rename the files after download to original long name) on the linux PC (ext4, ecryptfs) just fine and they do sync back to nextcloud server via the same client. |
I just updated to NC client version 3.1.0 (Ubuntu) and still have the same error |
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you! |
NC client 3.2.1 still gives same error. |
This comment was marked as resolved.
This comment was marked as resolved.
This happened to me a few days ago on Nextcloud 20.0.10 |
Can you test against the latest version of desktop client ? |
nextcloud desktop 3.2.2, I get the same error. The log file is probably way too long to paste here (>50MB), but I think I found the relevant lines:
|
@danielwbn I will need more detail because I cannot reproduce the bug with a build from master branch running on Windows and Linux Could you try sending a full log archive by syncing a test directory with only your test file ? |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
Same problem with latest macos client. I have a 251 characters filename (254 with extension) and is not getting synced. |
I too have this same problem. I didn't have the problem till I encrypted my home directory on KUbuntu 22.04 with ecryptfs 2 days ago.
My original file name had exactly 144 characters not including the extension, 148 with extension. I lowered it to 143 including the extension and it still didn't work. I've lowered the name again to 134 characters including the extension and still NextClould wouldn't sync the file. I did testing in my home folder and discovered that the 143 character max includes the extension. I was able to manually create all variations of the file name except the original file with 148 characters with the extension. I can confirm that the max characters retrieved with the getconf NAME_MAX is the characters including the extension. Just a note, LibreOffice cannot edit a file unless the filename is small enough to create a lock file which appends 7 characters to the beginning of the file making the max characters including the extension 143-7=136 characters. The only way NextClould reliably syncs the file is at a max character count of 133 characters including extension on my ecryptfs file-system. 10 characters lower than the max that the system can handle is the only file length that Nextcloud can sync and I tested this on my unencrypted system also and was only able to sync a file name max of 245 characters reliably. The 10 character less than system max is a good rule because of lock files. Just need to have better errors to help someone understand the limits. Anyone who wants the security of encrypting your home folder with ecryptfs or loves huge descriptive filenames will run in to this problem eventually. I will gladly give more information to help correct this problem. Just an idea, maybe doing like micro$haft winblow$ does, shorten the file name to the correct size with ~1 on the end but still know it's the full name like when we went from DOS with 8 characters + extension to winbow$ 95 which could handle 255 characters? |
One solution I had to implemented recently in another program and also have seen in some others is to use UNC paths (so basically prefix them when doing API calls, but depends on OS). |
Some details about the eCryptfs filename length from an author: https://unix.stackexchange.com/questions/32795/what-is-the-maximum-allowed-filename-and-folder-size-with-ecryptfs/32834#32834
So this is clearly not related to Nextcloud, but the client filesystem. |
As we can clearly see this is a problem (despite not produced by current nextcloud code itself indeed) Problem is that no one spotted this error during the phase of the filesystem design. As nexcloud is more popular people will have more and more data with more complex and deeper directory structure and with longer file names in theirs systems. This issue become larger problem sooner or later. So the question is what next cloud developers are going to do about it? Problably for now it's best to ignore this problem because it would incorporate redesign of file system (files would not be stored as filenames but rather as eg. uuid file name format on file system + corresponding entry with proper filename in the database) and I can only imagine what amount of work would be required to accomplish that change. |
TODO
Steps to reproduce
Expected behaviour
sync file
Actual behaviour
charaters:
filename: 150
filepath: 211 (inside cloud folder)
absolute filepath: 236 (in the filesystem)
if I reduce the filename to 144 chars the file gets synced as usual.
Nextcloud version:
13.0.4
There is no problem on the macOS computer, but on my Linux computer. May be this issue is related to Linux, ecryptfs, ext4.
The text was updated successfully, but these errors were encountered: