File name too long

Hello,
I am using Ubuntu 20.04 and the nextcloud client 3.0.2-20200924.150911.068ad89d8-1.0~focal1
and nextcloud server 19.0.3
With some file, I recently got some errors “file name too long”. This file has been since some time on the server
2020-11-03 14:23:31:820 [ warning nextcloud.gui.activity ]: Item “Bibliography/VacuumLeaks/xxxx” retrieved resulted in “File name too long”
where xxxx is of length 138, does not appear to contain any special characters (but contain spaces)
I recently added some nextcloud client on Windows 10 (I get this error on both clients, windows and linux).
Thanks in advance for the help

The length of a file name usually also includes the whole absolute path to the file. Move the file up in the directory hierarchy or shorten your directory names should solve the problem.

Thanks J-ed for the info.
Unfortunately, I cannot force users to rename all their files. Is there a fix possible on the DB of the server? Shall I submit a bug fix request?
Kind regards
Florian

Unfortunately, I cannot force users to rename all their files. Is there a fix possible on the DB of the server? Shall I submit a bug fix request?

Due to the fact that you will always run into a file name length limitation at some point on the different OSes (Win10 max 260 chars) I don’t believe that there’s chance to get this changed in the near future. Instead of renaming the files you can change the mount point or directories in which the files reside to reduce the total length of the file name pathes.

Only a few decades ago: 8.3 filename
I do not know why today people need 138 !!! characters.

If 138 is too less then 150 is also too less.
It makes no sense to move the directorys for a few charaters.

It’s 2020, there should be not perceptible limit to file paths. Just because it used to be worse, doesn’t mean it should be bad now.

@Fleurou: I would file this as a bug (issue) in Nextcloud.

Thanks for your replies.
For your information, the problem is that with 8.3 format, it was not accepted from the beginning from the OS. Here we have files that don’t get synchronised because of this issue, but nothing prevent the users from creating these files.
There is a good use case for long file name is when you want to improve the search of files without being able to look into the files. Having long and descriptive file names help you later to find the file.
@PancakeConnaisseur Thanks, I will file an issue
Regards

1 Like

For your information, the issue is filed:

Shorten the pathname is the best free solution if it suitable to your users, and you can take a look at tools like "Long Path Tool " or “Gs Richcopy 360”, both can handle this issue

The problem with lack of support for long paths / filenames is that many encryption tools will fail, e.g., gocryptfs. As using an encrypted filesystem as alternative to the NC-own E2E encryption is quite a good security mechanism, this seems quite a big problem to me.