Bug 403444 - Dolphin can't copy/move files with name longer than 125 characters from local machine onto samba share
Summary: Dolphin can't copy/move files with name longer than 125 characters from local...
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: Samba (show other bugs)
Version: 18.12.1
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-21 00:53 UTC by Thiago Sueto
Modified: 2020-02-12 21:04 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
error message (1.65 MB, video/webm)
2019-03-06 00:06 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Sueto 2019-01-21 00:53:48 UTC
SUMMARY
Transferring a file with name containing 126 characters or more from local machine onto remote samba share through Dolphin results in dialog error Could not write to [filenamewith126+charactershere][filenamewith126+charactershere].part

If transferring file with name containing 125 characters or less, it will work.
The type of character used (letter, number, symbol, space) does not affect this.

For some reason, the dialog message containing the error repeats the name twice, but that's likely another bug, please tell if I should make another bug report for that. Will gladly provide more information.

STEPS TO REPRODUCE
1. Copy or cut any file containing 126 characters or more in its name.
2. Paste on samba share folder which you have due access to and no permission problems whatsoever.

OBSERVED RESULT
Error dialog containing "Could not write to filenamefilename.part", no quotes.

EXPECTED RESULT
Successful file transference.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon Git Unstable (completely updated as of the submission of this bug)
KDE Plasma Version: 5.15.80
KDE Frameworks Version: 5.54.0
Qt Version: 5.11.2

ADDITIONAL INFORMATION
Always reproducible. Tested on three different samba shares. File transference occurs successfully on SSH/SFTP. Reproducible regardless of using tabs, split, separate windows or from desktop onto share.
Comment 1 Thiago Sueto 2019-01-21 01:04:26 UTC
I forgot to mention two things, sorry:

The easiest way I found to reproduce this and count characters was naming a file as
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
which should help reproduce. For easy counting, separate it into bundles of 10 characters per line on Kwrite/Kate. Remove last character, and transference works fine.

The other thing is that it is possible to create a file with 126 characters or more on the samba share itself, and transference is fine from samba share onto the local machine.
Comment 2 Kai Uwe Broulik 2019-01-21 08:14:20 UTC
I can confirm, smbc_open returns EINVAL for opening such a file for reading. Doesn't look like an issue on our side, though.
Comment 3 Patrick Silva 2019-03-06 00:06:25 UTC
Created attachment 118587 [details]
error message

Confirmed here. And the error message looks horrible.

samba 4.9.4
Operating System: Arch Linux 
KDE Plasma Version: 5.15.2
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.1
Comment 4 Nate Graham 2019-03-06 05:49:42 UTC
At least the error message should be less horrible now with https://cgit.kde.org/kio.git/commit/?id=d996ee0a4453f39726847bd60951c60a2b30194d in Frameworks 5.56.
Comment 5 Patrick Silva 2019-03-09 17:59:51 UTC
(In reply to Nate Graham from comment #4)
> At least the error message should be less horrible now with
> https://cgit.kde.org/kio.git/commit/
> ?id=d996ee0a4453f39726847bd60951c60a2b30194d in Frameworks 5.56.

Confirmed on Arch Linux after update to frameworks 5.56. :)
Comment 6 Thiago Sueto 2019-06-07 20:03:06 UTC
(In reply to Kai Uwe Broulik from comment #2)
> I can confirm, smbc_open returns EINVAL for opening such a file for reading.
> Doesn't look like an issue on our side, though.

Kai, where do you think this bug should be reported instead? I'll gladly report to the right place.

Just to mention a real situation where this bug can affect users: Yesterday this issue occurred at the translation agency I work with, a colleague was attempting to make a backup copy before a clean reinstall of the system and put it on the samba share, the operation couldn't finish before I located and renamed all 4 files that were more than 126 characters long from within 6 folders. Dolphin search was of great help in this case.

While naming files like this is unpractical and unreasonable, clients occasionally send such files to us, this bug doesn't occur on MATE nor Windows, and the workaround is rather time consuming.
Comment 7 Patrick Silva 2020-02-02 15:30:56 UTC
no longer reproducible on my system.

Operating System: Arch Linux 
KDE Plasma Version: 5.17.90
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.1
Comment 8 Harald Sitter 2020-02-12 14:35:36 UTC
Cannot reproduce it on latest stable neon either, neither against a samba nor windows server.

Anyone still able to reproduce this on kf5.67 + kio-extras19.12.2?
Comment 9 Nate Graham 2020-02-12 21:04:32 UTC
Works for me too with the original description and a file called "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"