Bug 429541 - [Regression] Can't create folders or files on ftp shares
Summary: [Regression] Can't create folders or files on ftp shares
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: FTP (show other bugs)
Version: 5.81.0
Platform: Arch Linux Linux
: VHI normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords: regression
: 432156 432231 432794 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-11-23 11:31 UTC by Martin Schnitkemper
Modified: 2022-11-14 18:58 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.81


Attachments
Error on create a folder (373.63 KB, image/png)
2020-11-23 11:31 UTC, Martin Schnitkemper
Details
attachment-6287-0.html (1.23 KB, text/html)
2020-12-20 11:53 UTC, Giorgio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schnitkemper 2020-11-23 11:31:04 UTC
Created attachment 133584 [details]
Error on create a folder

SUMMARY
If I try to create a folder on a ftp share I got the error, that the folder already exist, even if it didn't.  Same happen with files

STEPS TO REPRODUCE
1. inside dolphin connect to a network share, change into any folder and try to create a folder using the context menu or F10.  It results into an error, that the folder already exist.  Copy files or folders with i.e. drag&drop works, so it's not a permission issue. 
2. After downgraded kio (5.76.0-1 -> 5.75.0-2) it works again, so it seems to be a problem with the current version of kio. 

OBSERVED RESULT
Error message

EXPECTED RESULT
Create the folder

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.1
Kernel Version: 5.9.9-arch1-1
OS Type: 64-bit
Comment 1 Giorgio 2020-12-20 11:07:38 UTC
Same problem here.

When I use an ftp site through Dolphin and I try to create a folder or a file I get a red warning:

A file with name ‘Text File.txt’ already exists

A file with name ‘New Folder’ already exists.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
NAME="KDE neon"
VERSION="5.20"
ID=neon
ID_LIKE="ubuntu debian"
PRETTY_NAME="KDE neon User Edition 5.20"
VARIANT="User Edition"
VERSION_ID="20.04"
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.2


When I right click to create a new folder and the name window pop up, after a while (a couple of seconds) an alert says "examinating (finished).

If I'm quick enough to confirm I can create the file/folder, otherwise the OK button becomes disabled.

It doesn't happen with fish/ssh protocol, I can't try with samba.
Comment 2 Martin Schnitkemper 2020-12-20 11:36:50 UTC
(In reply to Giorgio from comment #1)
> It doesn't happen with fish/ssh protocol, I can't try with samba.
Thanks for your comment; after I changed the protocol from ftp to sftp and the port from 21 to 22, I was again able to create files & folders on the network drive.

I can live for the moment with this workaround.
Comment 3 Giorgio 2020-12-20 11:53:59 UTC
Created attachment 134226 [details]
attachment-6287-0.html

Happy it was helpful for you. Unfortunately ftp is essential for me. And
downgrading kio nor kio-extras does not work for me.

On Sun, 20 Dec 2020 at 12:36, Martin Schnitkemper <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=429541
>
> --- Comment #2 from Martin Schnitkemper <martin.schnitkemper@nexgo.de> ---
> (In reply to Giorgio from comment #1)
> > It doesn't happen with fish/ssh protocol, I can't try with samba.
> Thanks for your comment; after I changed the protocol from ftp to sftp and
> the
> port from 21 to 22, I was again able to create files & folders on the
> network
> drive.
>
> I can live for the moment with this workaround.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 4 Martin Schnitkemper 2020-12-20 13:37:58 UTC
(In reply to Giorgio from comment #3)

> Happy it was helpful for you. Unfortunately ftp is essential for me. And
> downgrading kio nor kio-extras does not work for me.
You tried kio-5.75.0? That did it for me, but since I am not sure of site effects, if I mix outdated with current software, I am staying on the latest release (now 5.77.0).

Bugreport is open since a month and still in status REPORTED, so I don't believe in a fast solution from the devs.
Comment 5 Giorgio 2020-12-20 17:32:11 UTC
(In reply to Martin Schnitkemper from comment #4)
> You tried kio-5.75.0? That did it for me, but since I am not sure of site
> effects, if I mix outdated with current software, I am staying on the latest
> release (now 5.77.0).

I tied several versions of both kio and kio-extras:
kio=5.76.0-0xneon+20.04+focal+build18
kio=5.75.0-0xneon+20.04+focal+build17
kio=5.75.0-0xneon+20.04+focal+build16
kio-extras=4:20.08.3-0xneon+20.04+focal+build19
kio-extras=4:20.08.3-0xneon+20.04+focal+build19 kio-extras-data=4:20.08.3-0xneon+20.04+focal+build19
kio-extras=4:20.08.3-0xneon+20.04+focal+build18 kio-extras-data=4:20.08.3-0xneon+20.04+focal+build18
kio-extras=4:20.08.3-0xneon+20.04+focal+build17 kio-extras-data=4:20.08.3-0xneon+20.04+focal+build17
kio-extras=4:20.08.2-0xneon+20.04+focal+build17 kio-extras-data=4:20.08.2-0xneon+20.04+focal+build17

And as you I'm staying at 5.77
Comment 6 Martin Schnitkemper 2020-12-30 15:26:35 UTC
Why has the platform of the report been changed from "Archlinux Packages" to "Neon Packages"?

I as the reporter of the bug have to set the platform where the bug has been observed, and that was "Archlinux Packages" and not "Neon Packages". Even if it also exist on other platforms, I can only confirm that it exist on that platform where I observed it, and the value should be kept on the value the reporter has been set while creating the report. 

Reverted to the original value.
Comment 7 Giorgio 2020-12-30 15:33:10 UTC
Sorry Martin, I was convinced I started the bug and that I erroneusly reported it under Arclinux Packages.

Anyway I confirm I have the same issue in Neon.
Comment 8 Justin Zobel 2021-01-03 22:43:33 UTC
Confirmed with KF 5.77.0 and Dolphin 20.12.0.
Comment 9 Nate Graham 2021-02-11 17:08:00 UTC
*** Bug 432794 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2021-02-11 17:08:07 UTC
*** Bug 432231 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2021-02-11 17:08:52 UTC
Pretty bad bug; raising priority.
Comment 12 Méven Car 2021-02-12 08:58:33 UTC
I did some investigation.

The issue is the new file dialog check files existence and hit a limitation in the ftp ioslave
 https://invent.kde.org/frameworks/kio/-/blob/master/src/ioslaves/ftp/ftp.cpp#L1317

I guess we fix this by stating with KIO::StatJob::StatSide::DestSide in https://invent.kde.org/frameworks/kio/-/blob/master/src/filewidgets/knewfilemenu.cpp#L1212
Comment 13 Bug Janitor Service 2021-03-27 10:01:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/380
Comment 14 Méven Car 2021-03-27 10:26:19 UTC
Git commit 71c7420e4b33b4bace8ed6d4fa45fa5e281d38bd by Méven Car.
Committed on 27/03/2021 at 10:00.
Pushed by dfaure into branch 'master'.

KNewFileMenu: use destination side to stat destination

M  +1    -1    src/filewidgets/knewfilemenu.cpp

https://invent.kde.org/frameworks/kio/commit/71c7420e4b33b4bace8ed6d4fa45fa5e281d38bd
Comment 15 Justin Zobel 2021-03-28 07:56:01 UTC
Confirmed working on git master. Thanks.
Comment 16 Nate Graham 2021-04-05 17:03:23 UTC
*** Bug 419560 has been marked as a duplicate of this bug. ***
Comment 17 Ahmad Samir 2021-04-21 14:54:08 UTC
*** Bug 432156 has been marked as a duplicate of this bug. ***
Comment 18 Germano Massullo 2021-05-10 23:12:33 UTC
(In reply to Méven Car from comment #14)
> Git commit 71c7420e4b33b4bace8ed6d4fa45fa5e281d38bd by Méven Car.
> Committed on 27/03/2021 at 10:00.
> Pushed by dfaure into branch 'master'.
> 
> KNewFileMenu: use destination side to stat destination
> 
> M  +1    -1    src/filewidgets/knewfilemenu.cpp
> 
> https://invent.kde.org/frameworks/kio/commit/
> 71c7420e4b33b4bace8ed6d4fa45fa5e281d38bd

What will be the stable release that will have the fix?
Comment 19 Nate Graham 2021-05-10 23:13:18 UTC
Frameworks 5.81. You can see in the "version fixed in" field.
Comment 20 Germano Massullo 2021-05-11 07:01:12 UTC
Well the bugs is still here. Using a FTP I created a new folder, then I could not paste files inside it

Dolphin 20.12.2
KDE Frameworks 5.81.0
Qt 5.15.2
Plasma 5.21.5
Fedora 34
Comment 21 Martin Schnitkemper 2021-05-11 07:09:55 UTC
I can confirm, that the problem has been solved in both distributions, "Arch" and "KDE neon", since both are on Frameworks 5.81.

But I still discovered another strange behaviour: if you create a new folder, then a name "New Folder" is offered, and if you try to create another folder, it is automaticly named as "New Folder (1)".  Not so on a file: first offer is i. e. for a textfile "Text file.txt" and if you try to create another one, "Text file.txt" is offered again and you get the "already exist" warning and has to correct the filename to continue. 

That happen only on a ftp share, not on a local device; there you get an offer like "Text file (1).txt".  

That does not really annyoing me, just want to mention it.
Comment 22 Martin Schnitkemper 2021-05-11 07:19:14 UTC
(In reply to Germano Massullo from comment #20)
> Well the bugs is still here. Using a FTP I created a new folder, then I
> could not paste files inside it
Can it be permission problem that you have no write access on the folder?

I just tried it, I can create a new folder and a textfile in the new folder, and can also drag & drop a file from the local filesystem to the remote filesystem.  For me it works as designed.
Comment 23 Giorgio 2021-05-11 07:59:55 UTC
Thank you, the problem is no more present on my system.

But when I create a new folder I get the notification

"Examination (Failed)"

It's only annoying, not a blocking issue.

Operating System: KDE neon 5.21
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Kernel Version: 5.4.0-73-generic
Comment 24 Martin Schnitkemper 2021-05-11 08:09:24 UTC
(In reply to Giorgio from comment #23)
> But when I create a new folder I get the notification
> 
> "Examination (Failed)"

The filesystem is probably not clean.  Try to unmount the volume and perform a fileysystem check.
Comment 25 Giorgio 2021-05-11 08:15:18 UTC
Thank you Martin for your reply.

Sorry, I'm not sure to understand your suggestion.

I'm logging in to a remote server, I can't unmount it and perform a check. Or are you talking about my local system?
Comment 26 Martin Schnitkemper 2021-05-11 08:45:42 UTC
(In reply to Giorgio from comment #25)
> I'm logging in to a remote server, I can't unmount it and perform a check.
> Or are you talking about my local system?
I assumed that it was a system like a NAS where you signed on.

If you have no physical access to the server, you should ask your service provider for assistance.  He can probably also explain the facts behind the error message.  I think that the problem is not related to the reported bug.
Comment 27 Giorgio 2021-05-11 08:47:29 UTC
Thank you very much for your assistance!

(In reply to Martin Schnitkemper from comment #26)
> I think that the problem is not related to the reported bug.
Comment 28 Germano Massullo 2021-05-11 09:04:01 UTC
(In reply to Martin Schnitkemper from comment #22)
> (In reply to Germano Massullo from comment #20)
> > Well the bugs is still here. Using a FTP I created a new folder, then I
> > could not paste files inside it
> Can it be permission problem that you have no write access on the folder?

It's not a permission problem. On Dolphin:
1) I copied a file from my localhost
2) I then entered ftp://x.x.x.x/
3) [Current folder: ftp://x.x.x.x] I created /foo folder and entered into it
4) [Current folder: ftp://x.x.x.x/foo] I could not paste anything
5) [Current folder: ftp://x.x.x.x/foo] I created folder bar
6) [Current folder: ftp://x.x.x.x/foo] (please note that current folder still is /foo) Now I was finally able to paste the file I copied in step 1), just because I created a bar folder inside foo......
Comment 29 Germano Massullo 2022-11-12 10:13:56 UTC
Please read https://bugs.kde.org/show_bug.cgi?id=419560#c2