Bug 509961 - Plasma ignoring it should not use proxy for FTP despite "ftpProxy" environment variable is empty
Summary: Plasma ignoring it should not use proxy for FTP despite "ftpProxy" environmen...
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: FTP (other bugs)
Version First Reported In: 6.18.0
Platform: openSUSE Linux
: NOR major
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-26 11:54 UTC by Rafael Linux User
Modified: 2025-09-29 12:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Linux User 2025-09-26 11:54:43 UTC
On an Intranet that requires the use of an authenticated proxy to browse the Internet, Plasma 6 ignores the fact that it should not use a PROXY for FTP, even though the corresponding variable is left empty in Plasma's proxy settings.

HTTP(S) browsing from all web browsers works correctly, respecting the httpProxy and httpsProxy values. The browsers prompt for the username and password.

However, when I try to access FTP servers from Dolphin or Krusader, Plasma attempts to use the proxy and eventually fails; that is, it is ignoring "NO_PROXY=".

This problem appeared with Plasma 6; it did not exist in Plasma 5.

It's not a problem with the system libraries, since I can access via the "ftp" command from the console and it doesn't try to use the proxy. However, if I use the "w3m" command to browse URLs with the http(s) protocol, it does ask for a username and password.

I also add that the pcman-qt file manager accesses FTP servers perfectly without any issues from trying to use a proxy.

I don't know under which hierarchy to place this bug since "kio-frameworks" mentions "sftp" but not "ftp", that's why I'm putting it here.

EXPECTED RESULT
To no use proxy when using FTP protocol

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20250714
KDE Plasma Version: 6.4.2
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1
Kernel Version: 6.15.6-1-default (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Assigned variables in "Proxy settings" in Plasma
ftpProxy=
httpProxy=http://10.160.0.12:3120
httpsProxy=http://10.160.0.12:3120
socksProxy=
Comment 1 Rafael Linux User 2025-09-26 12:36:28 UTC
Correction: Where I put ""NO_PROXY=" should be "ftpProxy=".
Comment 2 Nicolas Fella 2025-09-26 13:06:47 UTC
Please post your .config/kioslaverc file
Comment 3 Rafael Linux User 2025-09-26 13:37:55 UTC
ProxyUrlDisplayFlags=0

[Proxy Settings]
NoProxyFor=0.0.0.0/0,.mydomain.local,.mysite.es
Proxy Config Script=
ProxyType=1
ReversedException=false
ftpProxy=
httpProxy=http://10.160.0.12 3120
httpsProxy=http://10.160.0.12 3120
socksProxy=
Comment 4 Rafael Linux User 2025-09-26 13:52:27 UTC
System wide (console) proxy configuration uses exactly same values for operating system, and as I wrote, it works ignoring proxy for FTP protocol.

env | grep -i proxy
no_proxy=NoProxyFor=0.0.0.0/0,.mydomain.local,.mysite.es
gopher_proxy=
ftp_proxy=
https_proxy=http://10.160.0.12:3120
socks_proxy=
NO_PROXY=NoProxyFor=0.0.0.0/0,.mydomain.local,.mysite.es
http_proxy=http://10.160.0.12:3120
SOCKS_PROXY=
Comment 5 Nicolas Fella 2025-09-26 14:11:45 UTC
Thanks.

What happens when you remove the ftp_proxy= from the config file?
Comment 6 Nicolas Fella 2025-09-26 14:12:11 UTC
What's the output of running "QT_LOGGING_RULES=kf.kio.workers.ftp.debug=true kioclient ls ftp://ftp.slackware.com"?
Comment 7 Nicolas Fella 2025-09-26 14:23:16 UTC
(In reply to Nicolas Fella from comment #6)
> What's the output of running "QT_LOGGING_RULES=kf.kio.workers.ftp.debug=true
> kioclient ls ftp://ftp.slackware.com"?

Make that "G_MESSAGES_DEBUG=all QT_LOGGING_RULES=kf.kio.workers.ftp.debug=true kioclient ls ftp://ftp.slackware.com"
Comment 8 Rafael Linux User 2025-09-29 08:28:40 UTC
Remaining environment variable "ftp_proxy=" as is assigned by system, this is the ouput:
---------------------------- ftp_proxy=  as just when logging ------------------------------------
 G_MESSAGES_DEBUG=all QT_LOGGING_RULES=kf.kio.workers.ftp.debug=true kioclient ls ftp://ftp.slackware.com                                                           
kf.kio.workers.ftp: Starting
kf.kio.workers.ftp: "ftp.slackware.com" port= 0 user= ""
(process:2607403): GLib-GIO-DEBUG: 09:17:32.950: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
(process:2607403): pxbackend-DEBUG: 09:17:32.950: Active config plugins:
(process:2607403): pxbackend-DEBUG: 09:17:32.950:  - config-env
(process:2607403): pxbackend-DEBUG: 09:17:32.950:  - config-xdp
(process:2607403): pxbackend-DEBUG: 09:17:32.951:  - config-kde
(process:2607403): pxbackend-DEBUG: 09:17:32.951:  - config-gnome
(process:2607403): pxbackend-DEBUG: 09:17:32.951:  - config-sysconfig
(process:2607403): GLib-GIO-DEBUG: 09:17:32.952: Failed to initialize portal (GNetworkMonitorPortal) for gio-network-monitor: Not using portals
(process:2607403): GLib-GIO-DEBUG: 09:17:32.953: _g_io_module_get_default: Found default implementation networkmanager (GNetworkMonitorNM) for ‘gio-network-monitor’
(process:2607403): pxbackend-DEBUG: 09:17:32.953: px_manager_constructed: Up and running
(process:2607403): pxbackend-DEBUG: 09:17:32.953: px_manager_get_proxies_sync: url=ftp://ftp.slackware.com:0 online=1
(process:2607403): pxbackend-DEBUG: 09:17:32.953: px_manager_get_proxies_sync: Config[0] =
(process:2607403): pxbackend-DEBUG: 09:17:32.953: px_manager_get_proxies_sync: Proxy[0] = direct://
kf.kio.workers.ftp: proxy urls: QList()
kf.kio.workers.ftp: QUrl("ftp://ftp.slackware.com")
kf.kio.workers.ftp: host= "ftp.slackware.com" , port= 0 , user= "" password= [password hidden]
(process:2607403): pxbackend-DEBUG: 09:17:33.021: px_manager_get_proxies_sync: url=tcp://ftp.slackware.com:21 online=1
(process:2607403): pxbackend-DEBUG: 09:17:33.021: px_manager_get_proxies_sync: Config[0] = http://10.160.0.12:3120
(process:2607403): pxbackend-DEBUG: 09:17:33.021: px_manager_get_proxies_sync: Proxy[0] = http://10.160.0.12:3120
kf.kio.core: Can't communicate with kiod_kpasswdserver (for checkAuthInfo)! "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
kf.kio.core: Can't communicate with kiod_kpasswdserver (for queryAuthInfo)!
kf.kio.workers.ftp: user canceled proxy authentication, or communication error. 172
overriding error code!!1 172
kf.kio.workers.ftp: m_bLoggedOn= false  m_bBusy= false
kioclient: La comunicación con el servidor de contraseñas local ha fallado
kf.kio.workers.ftp: Done
kf.kio.workers.ftp:
------------------------------------------ output end --------------------------------------------
I observe that «user» is not assigned and the same for «password» (despite it's hidden) cause it doesn't ask for user/password values. Anyway, the fact is trying to access thru proxy.

It seems there is no difference if I execute same sentence unassigning ftp_proxy:
----------------------------------------------------------------------- unset ftp_proxy -------------------------------
unset ftp_proxy && G_MESSAGES_DEBUG=all QT_LOGGING_RULES=kf.kio.workers.ftp.debug=true kioclient ls ftp://ftp.slackware.com
kf.kio.workers.ftp: Starting
kf.kio.workers.ftp: "ftp.slackware.com" port= 0 user= ""
(process:2611973): GLib-GIO-DEBUG: 09:30:40.385: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
(process:2611973): pxbackend-DEBUG: 09:30:40.385: Active config plugins:
(process:2611973): pxbackend-DEBUG: 09:30:40.385:  - config-env
(process:2611973): pxbackend-DEBUG: 09:30:40.385:  - config-xdp
(process:2611973): pxbackend-DEBUG: 09:30:40.385:  - config-kde
(process:2611973): pxbackend-DEBUG: 09:30:40.385:  - config-gnome
(process:2611973): pxbackend-DEBUG: 09:30:40.385:  - config-sysconfig
(process:2611973): GLib-GIO-DEBUG: 09:30:40.386: Failed to initialize portal (GNetworkMonitorPortal) for gio-network-monitor: Not using portals
(process:2611973): GLib-GIO-DEBUG: 09:30:40.387: _g_io_module_get_default: Found default implementation networkmanager (GNetworkMonitorNM) for ‘gio-network-monitor’
(process:2611973): pxbackend-DEBUG: 09:30:40.387: px_manager_constructed: Up and running
(process:2611973): pxbackend-DEBUG: 09:30:40.387: px_manager_get_proxies_sync: url=ftp://ftp.slackware.com:0 online=1
(process:2611973): pxbackend-DEBUG: 09:30:40.387: px_manager_get_proxies_sync: Config[0] = http://10.160.0.12:3120
(process:2611973): pxbackend-DEBUG: 09:30:40.387: px_manager_get_proxies_sync: Config[1] =
(process:2611973): pxbackend-DEBUG: 09:30:40.387: px_manager_get_proxies_sync: Proxy[0] = http://10.160.0.12:3120
kf.kio.workers.ftp: proxy urls: QList("ftp://10.162.0.10:3128")
kf.kio.workers.ftp: QUrl("ftp://ftp.slackware.com")
kf.kio.workers.ftp: host= "ftp.slackware.com" , port= 0 , user= "" password= [password hidden]
(process:2611973): pxbackend-DEBUG: 09:30:40.456: px_manager_get_proxies_sync: url=tcp://10.162.0.10:3128 online=1
(process:2611973): pxbackend-DEBUG: 09:30:40.457: px_manager_get_proxies_sync: Proxy[0] = direct://
(process:2611973): pxbackend-DEBUG: 09:30:40.457: px_manager_get_proxies_sync: url=tcp: online=1
(process:2611973): pxbackend-DEBUG: 09:30:40.457: px_manager_get_proxies_sync: Config[0] = http://10.160.0.12:3120
(process:2611973): pxbackend-DEBUG: 09:30:40.457: px_manager_get_proxies_sync: Proxy[0] = http://10.160.0.12:3120
(process:2611973): pxbackend-DEBUG: 09:30:40.457: px_manager_get_proxies_sync: url=tcp: online=1
(process:2611973): pxbackend-DEBUG: 09:30:40.457: px_manager_get_proxies_sync: Config[0] = http://10.160.0.12:3120
(process:2611973): pxbackend-DEBUG: 09:30:40.457: px_manager_get_proxies_sync: Proxy[0] = http://10.160.0.12:3120
kf.kio.workers.ftp: m_bLoggedOn= false  m_bBusy= false
kioclient: Error desconocido

kf.kio.workers.ftp: Done
kf.kio.workers.ftp:
----------------------------------------------

As an additional observation, after doing the inline "unset", if I run the command assigning «ftp_proxy=""», I always get exactly the same output showed above. Moreover, when I show all the environment variables that contain "proxy" again, "ftp_proxy" no longer appears, no matter how many times I assign it "" or even '', when that variable should exist but with an empty value.

-> ftp_proxy=
-> env | grep -i proxy
no_proxy=NoProxyFor=0.0.0.0/0,.mydomain.local,.mysite.es
gopher_proxy=
https_proxy=http://10.160.0.12:3120
socks_proxy=
NO_PROXY=NoProxyFor=0.0.0.0/0,.mydomain.local,.mysite.es
http_proxy=http://10.160.0.12:3120
SOCKS_PROXY=

In this regard, it could be that "ftp_proxy" has an "empty" value assigned by the system's proxy configuration panel (yast proxy), since in that panel "http://" always appears by default, even if left empty; when reopening the panel, that value shows up again. I make this observation because of what I mentioned earlier about it not seeming possible to assign "empty" to a variable as a user.
Comment 9 Nicolas Fella 2025-09-29 08:50:40 UTC
okay, I can reproduce this now. It happens with this kioslaverc

[Proxy Settings]
ProxyType=1
ftpProxy=

*and*

export http_proxy=http://10.160.0.12:3120
Comment 10 Nicolas Fella 2025-09-29 09:20:49 UTC
(In reply to Rafael Linux User from comment #8)
> Remaining environment variable "ftp_proxy=" as is assigned by system, this
> is the ouput:
> ---------------------------- ftp_proxy=  as just when logging
> ------------------------------------
>  G_MESSAGES_DEBUG=all QT_LOGGING_RULES=kf.kio.workers.ftp.debug=true
> kioclient ls ftp://ftp.slackware.com                                        
> 
> kf.kio.workers.ftp: Starting
> kf.kio.workers.ftp: "ftp.slackware.com" port= 0 user= ""
> (process:2607403): GLib-GIO-DEBUG: 09:17:32.950: _g_io_module_get_default:
> Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
> (process:2607403): pxbackend-DEBUG: 09:17:32.950: Active config plugins:
> (process:2607403): pxbackend-DEBUG: 09:17:32.950:  - config-env
> (process:2607403): pxbackend-DEBUG: 09:17:32.950:  - config-xdp
> (process:2607403): pxbackend-DEBUG: 09:17:32.951:  - config-kde
> (process:2607403): pxbackend-DEBUG: 09:17:32.951:  - config-gnome
> (process:2607403): pxbackend-DEBUG: 09:17:32.951:  - config-sysconfig
> (process:2607403): GLib-GIO-DEBUG: 09:17:32.952: Failed to initialize portal
> (GNetworkMonitorPortal) for gio-network-monitor: Not using portals
> (process:2607403): GLib-GIO-DEBUG: 09:17:32.953: _g_io_module_get_default:
> Found default implementation networkmanager (GNetworkMonitorNM) for
> ‘gio-network-monitor’
> (process:2607403): pxbackend-DEBUG: 09:17:32.953: px_manager_constructed: Up
> and running
> (process:2607403): pxbackend-DEBUG: 09:17:32.953:
> px_manager_get_proxies_sync: url=ftp://ftp.slackware.com:0 online=1
> (process:2607403): pxbackend-DEBUG: 09:17:32.953:
> px_manager_get_proxies_sync: Config[0] =
> (process:2607403): pxbackend-DEBUG: 09:17:32.953:
> px_manager_get_proxies_sync: Proxy[0] = direct://
> kf.kio.workers.ftp: proxy urls: QList()
> kf.kio.workers.ftp: QUrl("ftp://ftp.slackware.com")
> kf.kio.workers.ftp: host= "ftp.slackware.com" , port= 0 , user= "" password=
> [password hidden]
> (process:2607403): pxbackend-DEBUG: 09:17:33.021:
> px_manager_get_proxies_sync: url=tcp://ftp.slackware.com:21 online=1
> (process:2607403): pxbackend-DEBUG: 09:17:33.021:
> px_manager_get_proxies_sync: Config[0] = http://10.160.0.12:3120
> (process:2607403): pxbackend-DEBUG: 09:17:33.021:
> px_manager_get_proxies_sync: Proxy[0] = http://10.160.0.12:3120
> kf.kio.core: Can't communicate with kiod_kpasswdserver (for checkAuthInfo)!
> "Did not receive a reply. Possible causes include: the remote application
> did not send a reply, the message bus security policy blocked the reply, the
> reply timeout expired, or the network connection was broken."
> kf.kio.core: Can't communicate with kiod_kpasswdserver (for queryAuthInfo)!
> kf.kio.workers.ftp: user canceled proxy authentication, or communication
> error. 172
> overriding error code!!1 172
> kf.kio.workers.ftp: m_bLoggedOn= false  m_bBusy= false
> kioclient: La comunicación con el servidor de contraseñas local ha fallado
> kf.kio.workers.ftp: Done
> kf.kio.workers.ftp:

What happens here is that for the initial FTP connection it correctly identifies that no proxy should be used, as can be seen by

> kf.kio.workers.ftp: proxy urls: QList()

The problem is that later when the worker makes a TCP connection to the server it queries for the SOCKS proxy, and there libproxy reads the http_proxy environment variable and thus we get the wrong proxy for that. Unsetting http_proxy should make it work for you then
Comment 11 Nicolas Fella 2025-09-29 09:31:38 UTC
export PX_FORCE_CONFIG=kde should also work
Comment 12 Rafael Linux User 2025-09-29 09:59:50 UTC
I think I haven't quite understood your proposal about not assigning a value to http_proxy. If I did that, I wouldn't be able to browse using the http protocol. What's failing is precisely that it seems like in the current version of Plasma, it ignores "ftp_proxy". Tell me if I've misunderstood.

In the console, I ran
export PX_FORCE_CONFIG=kde
dolphin

and tried to access the FTP servers that I can no longer reach with the current Plasma versions, and the difference from not using that environment variable is that now Dolphin stays stuck forever trying to access the remote server, shows no error, and in the console it stays like this:

org.kde.dolphin: could not find entry for charset= "Other encoding ()"
org.kde.UserFeedback: failed to probe user feedback submission interface: "Host telemetry.kde.org not found" ""
kf.kio.workers.ftp: Can't open for listing
kf.kio.workers.ftp: Can't open for listing

and I can only click "Cancel" in Dolphin to break that loop where it shows "Loading".

As additional information, Plasma's handling of the http proxy seems to ignore cases like mine, which require authentication. If I try to download new plasmoids it fails, because it tries (correctly) to use the proxy but does NOT ask for username and password (as web browsers do).

What other information can I provide?

Thanks
Comment 13 Nicolas Fella 2025-09-29 11:09:36 UTC
(In reply to Rafael Linux User from comment #12)
> I think I haven't quite understood your proposal about not assigning a value
> to http_proxy. If I did that, I wouldn't be able to browse using the http
> protocol.

That would still work because libproxy would read the HTTP proxy from .config/kioslaverc
For anything that uses libproxy at least. 

> What's failing is precisely that it seems like in the current
> version of Plasma, it ignores "ftp_proxy". Tell me if I've misunderstood.

The way it is designed to work is that the FTP proxy is read from .config/kioslaverc, and that is working as expected. The problem is that libproxy picks up a wrong value for the SOCKS proxy, from your environment variables. For whatever reason libproxy uses the http_proxy environment variable for this, which sounds like a bug in libproxy.

> In the console, I ran
> export PX_FORCE_CONFIG=kde
> dolphin
> 
> and tried to access the FTP servers that I can no longer reach with the
> current Plasma versions, and the difference from not using that environment
> variable is that now Dolphin stays stuck forever trying to access the remote
> server, shows no error, and in the console it stays like this:
> 
> org.kde.dolphin: could not find entry for charset= "Other encoding ()"
> org.kde.UserFeedback: failed to probe user feedback submission interface:
> "Host telemetry.kde.org not found" ""
> kf.kio.workers.ftp: Can't open for listing
> kf.kio.workers.ftp: Can't open for listing

That looks like the proxy part is working as expected and it fails on something else.

What's the output of PX_FORCE_CONFIG=kde G_MESSAGES_DEBUG=all QT_LOGGING_RULES=kf.kio.workers.ftp.debug=true kioclient ls ftp://ftp.slackware.com ?

> and I can only click "Cancel" in Dolphin to break that loop where it shows
> "Loading".
> 
> As additional information, Plasma's handling of the http proxy seems to
> ignore cases like mine, which require authentication. If I try to download
> new plasmoids it fails, because it tries (correctly) to use the proxy but
> does NOT ask for username and password (as web browsers do).

That's an unrelated topic, let's focus on one thing at a time
Comment 14 Rafael Linux User 2025-09-29 12:29:53 UTC
Yes, of course, I just want to solve this problem; I mentioned the rest in case it had any relation. This is the output of your command:

-> PX_FORCE_CONFIG=kde G_MESSAGES_DEBUG=all QT_LOGGING_RULES=kf.kio.workers.ftp.debug=true kioclient ls ftp://ftp.slackware.com
kf.kio.workers.ftp: Starting
kf.kio.workers.ftp: "ftp.slackware.com" port= 0 user= ""
(process:56052): GLib-GIO-DEBUG: 13:54:11.225: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
(process:56052): pxbackend-DEBUG: 13:54:11.226: Active config plugins:
(process:56052): GLib-GIO-DEBUG: 13:54:11.226: Failed to initialize portal (GNetworkMonitorPortal) for gio-network-monitor: Not using portals
(process:56052): GLib-GIO-DEBUG: 13:54:11.227: _g_io_module_get_default: Found default implementation networkmanager (GNetworkMonitorNM) for ‘gio-network-monitor’
(process:56052): pxbackend-DEBUG: 13:54:11.227: px_manager_constructed: Up and running
(process:56052): pxbackend-DEBUG: 13:54:11.227: px_manager_get_proxies_sync: url=ftp://ftp.slackware.com:0 online=1
(process:56052): pxbackend-DEBUG: 13:54:11.227: px_manager_get_proxies_sync: Proxy[0] = direct://
kf.kio.workers.ftp: proxy urls: QList()
kf.kio.workers.ftp: QUrl("ftp://ftp.slackware.com")
kf.kio.workers.ftp: host= "ftp.slackware.com" , port= 0 , user= "" password= [password hidden]
(process:56052): pxbackend-DEBUG: 13:54:11.291: px_manager_get_proxies_sync: url=tcp://ftp.slackware.com:21 online=1
(process:56052): pxbackend-DEBUG: 13:54:11.291: px_manager_get_proxies_sync: Proxy[0] = direct://
kf.kio.workers.ftp: m_bLoggedOn= false  m_bBusy= false
kioclient: Máquina ftp.slackware.com: Equipo no encontrado desconocida
kf.kio.workers.ftp: Done
kf.kio.workers.ftp:

Keep in mind anyway that attempting to access external FTP sites will most likely not work on my network, because DNS probably won't resolve those URLs. The FTP URLs I use are all local IPs, which is why I require that a proxy be used with the FTP protocol.

->ftp ftp.slackware.com
ftp: Can't lookup `ftp.slackware.com:ftp': Unknow name or service

>The problem is that later when the worker makes a TCP connection to the server it queries for the SOCKS proxy, and there libproxy reads the http_proxy environment variable and thus we get the wrong proxy for that. Unsetting http_proxy should make it work for you then

Regarding that, I understand that neither the ftp command nor the pcman-qt file manager use that library, just like FileZilla (which also works) uses another one—is that correct?