Bug 154098

Summary: bugs in ftp protocol handler, when using proxy
Product: [Frameworks and Libraries] frameworks-kio Reporter: Ilia K. <mail4ilia>
Component: FTPAssignee: David Faure <faure>
Status: REOPENED ---    
Severity: normal CC: adawit, asn, grizlik78, ingomar, kdelibs-bugs, maksim, nate, oyvinds, rafael.linux.user, rasasi78, simonandric5
Priority: NOR Keywords: testcase
Version: 5.46.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Proxies workaround to get ftp to work

Description Ilia K. 2007-12-15 13:46:07 UTC
Version:           3.97.00 (KDE 4.0 RC2) (using KDE 3.97.00 (KDE 4.0 RC2), Kubuntu packages)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.22-14-generic

Probably, handling a proxy is totally broken in konqueror, so this bug may have a common roots with bug #154095

Steps to reproduce:
1-5. Follow steps 1-5 from bug #154095
6. Type some FTP address in an address bar, e.g. ftp://ftp.kernel.org
7. Observe the error message instead of a page. For example:
An error occurred while loading ftp://ftp.kernel.org:
Access denied to smb://ftp.kernel.org.

Steps to reproduce another error:
1-4. Follow steps 1-4 from bug #154095
5. Enter some ftp proxy or  turn on  "Use the same proxy server for all protocols" option
6. Type some FTP address in an address bar, e.g. ftp://ftp.kernel.org
7. Observe a dialog box with a error message. For example:
URL cannot be listed
ftp://ftp.kernel.org
Comment 1 Maksim Orlovich 2007-12-15 17:08:42 UTC
Thanks for testing this stuff...
Comment 2 Ian M 2008-01-17 17:19:27 UTC
Confirming this behaviour using KDE Four Live CD 1.0

I have http and https proxy set (not that they work anyway, but that's another bug report), ftp proxy is blank.
Comment 3 Öyvind Saether 2009-01-04 08:39:29 UTC
1. Configure a *http* proxy. Leave proxy settings for ftp and https blank.
2. Go to any ftp site, watch Konqueror FAIL.

QT: 4.5.0_beta1
KDE: 4.1.87

Konqueror
Version 4.1.87 (KDE 4.1.87 (KDE 4.2 >= 20090101))
Using KDE 4.1.87 (KDE 4.1.87 (KDE 4.2 >= 20090101))


KONQUEROR OUTPUT:

The requested operation could not be completed
Access Denied
Details of the Request:
URL: ftp://ftp.trolltech.no/qt/source/
Protocol: ftp
Date and Time: Sunday 04 January 2009 08:31
Additional Information: smb://ftp.trolltech.no/qt/source/


CONSOLE OUTPUT:
$ konqueror 
konqueror(6407)/kio (KIOJob) KIO::StatJobPrivate::slotRedirection: Redirection f                                                         rom  KUrl("ftp://ftp.trolltech.no/qt/source/ftp://ftp.trolltech.no/qt/source/")                                                           to  KUrl("smb://ftp.trolltech.no/qt/source/ftp://ftp.trolltech.no/qt/source/")                                                           REJECTED! 
konqueror(6407)/kio (KIOJob) KIO::ListJobPrivate::slotRedirection: ListJob: Redi                                                         rection from  KUrl("ftp://ftp.trolltech.no/qt/source/")  to  KUrl("smb://ftp.tro                                                         lltech.no/qt/source/")  REJECTED! 
konqueror(6407)/kio (KIOJob) KIO::StatJobPrivate::slotRedirection: Redirection f                                                         rom  KUrl("ftp://ftp.trolltech.no/qt/source/")  to  KUrl("smb://ftp.trolltech.no                                                         /qt/source/")  REJECTED! 

Comment 4 Artem S. Tashkinov 2009-05-05 15:39:41 UTC
*** Bug 188290 has been marked as a duplicate of this bug. ***
Comment 5 Artem S. Tashkinov 2009-05-05 15:42:52 UTC
The bug persists in KDE 4.2.2/Qt 4.5.0 - FTP protocol is completely unusable in Konqueror and Dolphin if only HTTP proxy is set.
Comment 6 Dawit Alemayehu 2011-03-08 06:26:13 UTC
*** Bug 230367 has been marked as a duplicate of this bug. ***
Comment 7 Dawit Alemayehu 2011-03-08 06:42:54 UTC
#1. The issue of setting individual proxy settings as mentioned above works fine for me in KDE 4.6 ; so I assume this is no longer an issue.

#2. FTP over HTTP proxy can never be supported by Dolphin because such requests always return a web page. There is a pending fix for restroing this functionality in Konqueror. See https://git.reviewboard.kde.org/r/100814/.

#3. HTTPS over proxy has also been fixed for 4.6.2. See https://projects.kde.org/projects/kde/kdelibs/repository/revisions/8a2929b2dd8b7fe166053aed51a5def3c6565844

I think that covers all the issue hinted or mentioned here. Feel free to reopen this ticket if item #1 is not working for you in KDE 4.6 and higher. Follow bug # 236630 for item #2 and update to 4.6.2 when it comes out for both item #1 and #3.
Comment 8 Rafael Linux User 2018-06-12 17:29:09 UTC
OpenSUSE 15, Dolphin 17.12.3, KDE 5.45.0, Qt 5.9.4

I just installed and configure my proxy data correctly:
In Yast: 
  HTTP: http://10.162.0.X:PPPP
  HTTPS: http://10.162.0.X:PPPP
  FTP: (I always left blank but when I edit, appear ALWAYS "http://")
  Exceptions:  localhost,127.0.0.1,10.162.0.0/8
In Preferences: Take system proxy preferences

I can update, install, browse with Firefox and Chrome (previously, I set their proxies configurations to "use proxy settings"). I can access protocols like smb, fish, http and https (these both in browsers), but when I try to access ftp like 10.162.0.2, Dolphin and Krusader fails, giving an "The proxy type is not valid for this operation". 

However, FILEZILLA or CAJA file manager works like a charm out of the box.

Please, I need to use Krusader/Dolphin
Comment 9 Andreas Schneider 2018-09-03 05:39:54 UTC
SFTP has nothing to do with FTP. Sorry.
Comment 10 Rafael Linux User 2018-09-03 08:34:50 UTC
(In reply to Andreas Schneider from comment #9)
> SFTP has nothing to do with FTP. Sorry.

Excuse me, that reply is for ... what post? I didn't mention sftp ...  :(
Comment 11 Andreas Schneider 2018-09-03 13:17:09 UTC
The 'Component:' was set to SFTP. I've changed it back to default.
Comment 12 Rafael Linux User 2018-10-03 08:37:53 UTC
Any news about this BIG problem. I continue needing to use CAJA or "Double Commander instead Dolphin or Krusader, that I was using for years without problems in the same LAN with proxy. 

Please, this is a big issue that makes work seriously with Plasma impossible.

Thank you
Comment 13 Rafael Linux User 2018-10-03 08:39:06 UTC
*** Bug 382295 has been marked as a duplicate of this bug. ***
Comment 14 Rafael Linux User 2018-10-03 08:39:49 UTC
*** Bug 382198 has been marked as a duplicate of this bug. ***
Comment 15 Rafael Linux User 2018-10-15 10:48:07 UTC
(In reply to Dawit Alemayehu from comment #7)
> #1. The issue of setting individual proxy settings as mentioned above works
> fine for me in KDE 4.6 ; so I assume this is no longer an issue.

In my case (third time I install OpenSUSE 15 from zero) the fact that the problem is related with Plasma (KIO I presume) is clear. This time, I didn't configure anything but static IP and proxy setting at system level (using YaST). All connections that need FTP (like repositories access) was fine thru console (using YaST at console or wget. At this point, if I use Dolphin or Krusader to access FTP LOCAL services, no problem at all. 

However, if I configure Plasma proxy setting to get system proxy values and I close the Plasma session and I log in again, I can see Plasma proxy is getting  correctly the system proxy values, when I enable "show proxy values"), but now, any attempt to access again with Dolphin or Krusader to the same FTP sites, fails showing "Internal error. Please, send a complete error report to http::/bugs.kde.org", and this is what I'm doing again ... something is failing in Plasma when NOT using proxy setting for FTP but for any other protocol.

Please, this is not solved!!!

I can facilitate any additional info you need.
Plasma 5.12.6
Frameworks 5.46.0
QT 5.9.4
Kernel 4.12 64bits

Thank you

> I think that covers all the issue hinted or mentioned here. Feel free to
> reopen this ticket if item #1 is not working for you in KDE 4.6 and higher.
> Follow bug # 236630 for item #2 and update to 4.6.2 when it comes out for
> both item #1 and #3.
Comment 16 Rafael Linux User 2018-10-15 13:59:40 UTC
Created attachment 115660 [details]
Proxies workaround to get ftp to work
Comment 17 Rafael Linux User 2018-10-15 14:01:28 UTC
I found by myself the issue. Since I don't know what version of KDE/Plasma (at least, one or two years ago, when all it worked fine) the way Plasma works with setting from system changed. I'll explain:

On system proxy (YaST) you MUST use proxy setting notation like URLs (http ....). If you choose Plasma proxy setting to use these setting, all was working fine, without any problem, even FTP connections.

Some day, after a Plasma update, one and a half years ago, FTP stop working when using Plasma KIO (that is, Dolphin, Krusader ....) and only Plasma agnostic apps works (Caja, Filezilla, ...).  I reported this issue then, but no one identified what was going wrong.

Desesperate for my Krusader dependence and the Krusader dependence of Plasma, today I installed and tried all possibilities again. And finally I found what's the problem: Some changes in Plasma makes that proxy assigned using "http" header notation doesn't work with FTP connection. That's to say, if we don't use  "http" notation on plasma proxy data fields (using directly the IP) all protocols (including FTP) works as it always worked. 

However, if you set Plasma proxy to get the values of system proxy (that are in the "http" convention) ftp protocol will fail, despite I'M NOT USING ANY PROXY FOR FTP (is left by default in system proxy exactly like "http://").

So, in conclusion, the workaround for this issue is:
1 - Assign system proxy as usual with "http://" header convention.
2 - Assing MANUAL Plasma proxy, using "IP" convention. If you use choose "Use system proxy configuration", ftp protocol will fail.

I expect this issue will be solved in next Plasma releases.

Thank you



This worked like a charm
Comment 18 Rafael Linux User 2018-10-16 09:19:22 UTC
The workaround doesn't solve the ftp problem. After a reboot and some more test, I discovered that Dolphin had been cached the FTP site folders showed. So no workaround for this problem. Again, I need to use Caja, Double Commander and Visual Code. 

This is a headache unsolved