SFTP broken in LE12

  • Hello!

    Seems that FTPs connectivity (with TLS) is broken in LE12 as i found.

    I've used LE 11.0.6 on 4 different devices (Raspberry 2-3-4-5) where i was able to connect to an FTP server with TLS authentication (FTPS). I upgraded / clean installed LE 12.0.0 where the same source gives me empty folder.

    I have had this in sources.xml on both versions, i replaced username and password and server URL here:

    Code
            <source>
                <name>FTPs</name>
                <path pathversion="1">ftp://username:password@servername:customport/folder/|auth=TLS&verifypeer=false</path>
                <allowsharing>true</allowsharing>
            </source>


    Here is my log from LE 12.0.0 during attempt to enter in this source. Debug log was enabled in KODI. I've replaced my server details here again:


    I've downgraded one of my machines from 12.0.0 and FTPs started to work as expected in 11.0.6. Then upgraded again to 12.0.0 and it stopped working. Definitely something wrong in 12.0.0

    Here is the log from LE 11.0.6 which works fine. I replaced servername and port here again, notice that USERNAME AND PASSWORD are not in the log, those were replaced to these CAPITAL words by KODI, not by me.

    ALSO PLEASE NOTICE, THAT THE /FOLDER AFTER THE SERVERNAME EXISTS HERE, WHILE IN ABOVE NON-WORKING SCENARIO ON 12.0.0 THE FOLDER IS MISSING AFTER THE SERVERNAME:PORT !! THIS WAS THE DIFFERENCE I COULD OBSERVE HERE IN THE LOGS.


    Any clue what's going on in LE 12.0.0 ?

    Thanks so much ! ;)

  • TLS provides encryption and not authentication. You are probably connecting to regular FTP service with StartTLS support and not to FTPS (or FTP-over-SSL)

  • I haven't talked about SFTP, i was hoping to have been clear.

    This is FTPS also known as FTP over TLS/SSL.

    I'm not using any FTP service on LE, as i want to connect to one and not hosting one. In this sense, i'm FTP client.

    All this above has worked in LE 9, 10, 11 from stock. Broken in LE 12.

  • chewitt Thanks for these links. Very interesting indeed. I was expecting an OS component here that could have been the root cause, but seems its rather KODI related indeed. Not sure how Android and LE shares versions of certain linux components that could be the cause. Anyway, this is a NO GO for me to use LE12, as i'm relying on FTPS to access my NAS from different places. I'll just skip LE12 for now and use LE11. Hoping there will be an update eventually on KODI and/or LE12.

  • Hi guys, I can confirm that the problem exists - tested on a self-built .ova image based on latest 21.1 kodi (commit 7938029863608416aaf85ee1dd2bb9cb84dc6d7b from LE repo).

    I was able to fix the issue by upgrading the curl package to the latest version - 8.9.1 (previously was 8.6.0). Versions 8.7+ have some fixes related to FTP - https://curl.se/changes.html

  • It works on LibreELEC-Generic.x86_64-12.0-nightly-20230309-5426f16.img.gz.

    You need to enable component logging in Kodi and select libcURL as component. This will show you much more information in log file to compare.