https://bugs.kde.org/show_bug.cgi?id=524944

            Bug ID: 524944
           Summary: kio_ftp appends absolute path to current working
                    directory during RETR, causing doubled path 550 errors
                    on Apache FtpServer
    Classification: Frameworks and Libraries
           Product: kio-extras
      Version First unspecified
       Reported In:
          Platform: CachyOS
                OS: Linux
            Status: REPORTED
          Severity: major
          Priority: NOR
         Component: SFTP
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

ENVIRONMENT
- OS: CachyOS
- Desktop Environment: KDE Plasma
- Component: kio-extras (kio_ftp worker)
- Target FTP Server: Android FTP Server (identifies as "215 UNIX Type: Apache
FtpServer")

STEPS TO REPRODUCE
1. Host an FTP server on an Android device running Apache Mina FtpServer.
2. Enable KIO FTP debug logging and attempt a file copy using kioclient5:
   QT_LOGGING_RULES="kf.kio.workers.ftp.debug=true" kioclient5 copy
"ftp://<SERVER_IP>:<PORT>/DCIM/Camera/<FILE>.jpg" ~/test.jpg
3. Inspect the command-by-command trace output.

OBSERVED RESULTS
1. kio_ftp authenticates and issues `CWD /DCIM/Camera` to inspect/stat the
target file.
2. When transitioning to fetch the file contents (RETR), kio_ftp sends the full
absolute path while remaining inside `/DCIM/Camera/`.
3. The server attempts to resolve `/DCIM/Camera//DCIM/Camera/<FILE>.jpg` and
responds with:
   `550 /DCIM/Camera//DCIM/Camera/<FILE>.jpg: No such file or directory`
4. kio_ftp retries three times on new PASV ports, repeats the doubled path
request, and ultimately fails with "Can't open for reading."

EXPECTED RESULTS
kio_ftp should either:
1. Issue `RETR <FILE>.jpg` relative to the current working directory
(`/DCIM/Camera/`), OR
2. Reset the working directory to root (`CWD /`) before issuing `RETR
/DCIM/Camera/<FILE>.jpg`.

ADDITIONAL CONTEXT & PROOF
- Curl test: Fetching the exact same file using `curl` over the same network
and credentials works without issues, proving the server, firewall, and network
stack are operating correctly.
- Headless test: Thumbnails were completely disabled, and the issue reproduces
identically in `kioclient5`, confirming the bug resides in kio_ftp's internal
path/state management rather than Dolphin's UI.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to