Summary: | KIO FTP slave failed to access files on swiftp FTP server(http://ppareit.github.io/swiftp/ ) | ||
---|---|---|---|
Product: | [Unmaintained] kio | Reporter: | V字龍(Vdragon) <Vdragon.Taiwan> |
Component: | ftp | Assignee: | David Faure <faure> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aacid, adawit, fabiodurso |
Priority: | NOR | ||
Version: | 4.10.5 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdelibs/d6453435f0d475e16b2512782b9b3e40bb603da1 | Version Fixed In: | 4.12.4 |
Sentry Crash Report: |
Description
V字龍(Vdragon)
2013-10-19 20:14:54 UTC
Hi, can you reproduce the issue on some publicly accessible server? How are you opening the file? ("open file" dialog, dolphin, konqueror, command line, ...) I can open remote FTP files here. Waiting for info @Fabio D'Urso I can't reproduce this issue on a standard FTP server. I tried to open file from Dolphin FM and from the "open file" dialog of Okular itself. The FTP server I met issue with is an Android application from the following site https://github.com/ppareit/swiftp which seems to lack certain functionalities(FTP commands?) than other alternatives. So maybe this issue is actually related to FTP KIO slave. From my perspective I'm expecting a more detailed error message to appear instead of "We can't read that file.". Seriously? What kind of more detailed error are you expecting? @ Albert Astals Cid Like "Remote server didn't support XXXX command", something FTP KIO slave should(?) know about. Currently the error message is much like "Could not open <file>. Reason: Could not open <file>" to me. More info about the issue: * I can normally transfer files using GNOME Nautilus FM and FileZilla FTP client * On Dolphin FM, copying files from swiftp server to local storage produces .part(however the content seems to be the same as in the remote) files in local with "transfer failed" error dialogs * On Okular, opening files from remote server(whether from Dolphin or from Okular itself) fails * kdelibs version on my system is 4.10.5, which is from Ubuntu 13.04 repository. Since the problem is more likely on KIO-ftp(which seems to be provided by kdelibs) I've changed the affected product. I installed a demo version of this ftp server and it does not support the RETR command which causes kio_ftp to fail with ERR_CANNOT_OPEN_FOR_READING error in Ftp::ftpGet. It has no problem listing the contents returned by the ftp server. (In reply to comment #6) > I installed a demo version of this ftp server and it does not support the > RETR command which causes kio_ftp to fail with ERR_CANNOT_OPEN_FOR_READING > error in Ftp::ftpGet. It has no problem listing the contents returned by the > ftp server. Correction actually that is not the problem. Apparently, that is only returned when you do not have access to the file. The real problem with viewing files you do have access to is the code that checks for file size: kio_ftp(31275) Ftp::ftpSendCmd: send> SIZE /ueventd.rc kio_ftp(31275) Ftp::ftpResponse: > 550 No directory traversal allowed in SIZE param kio_ftp(31275) Ftp::ftpResponse: resp > 550 No directory traversal allowed in SIZE param Apparently the server does not allow you to use full file path to do SIZE requests. I think this is probably something we can address. Proposed fix https://git.reviewboard.kde.org/r/116524/ Proposed fix https://git.reviewboard.kde.org/r/116524/ Git commit d6453435f0d475e16b2512782b9b3e40bb603da1 by Dawit Alemayehu. Committed on 01/03/2014 at 23:39. Pushed by adawit into branch 'KDE/4.12'. Whenever possible, use relative paths for SIZE requests, e.g. SIZE foo/bar.txt FIXED-IN: 4.12.4 REVIEW: 116524 M +16 -3 kioslave/ftp/ftp.cpp http://commits.kde.org/kdelibs/d6453435f0d475e16b2512782b9b3e40bb603da1 |