FTPS broken in LE12

  • After examining the various nightlies, I have found the best possible version for curl and its library that works with LibreELEC 12.0.2 (stable). This applies to both the Generic(-legacy).x86_64 platform, as I have conducted extensive testing with it, and for RPi2/3, as these are my media players. The versions are curl and libcurl 8.5.0. curl&libcurl-8.5.0_Generic(-legacy).x86_64__&__RPi2~3.zip
    This version also works well with higher LibreELEC versions. However, it does not work with lower ones!

    Note: The file libcurl.so.4.8.0 consists of libcurl/8.5.0. One refers to a versioning for the Application Binary Interface (ABI), while the other pertains to the Application Programming Interface (API). I cannot provide an explanation of the differences, as I am not a coder.

  • For those who prefer to extract curl and libcurl themselves, here is the reference from where I obtained them:

    Generic(-legacy).x86_64LibreELEC-Generic.x86_64-12.0-nightly-20240129-40b8914.img.gz
    RPi2/3LibreELEC-RPi2.arm-12.0-nightly-20240201-76bf1fa.img.gz

    These are the last versions that contain 8.5.0

  • I would suggest testing if curl or Kodi/curl api is the issue. Kodi Piers (LE13) is in development presently with curl 8.13.0. If there is an issue it would be the right time to get it fixed at the source.

    From LE - something like -

    curl -k --user myusername:mypassword ftps://ftpserver.mine

    and check that it is showing you the files you expect, they are accessible ….
    - and why / what are the missing files?
    What is the common pattern? E.g. Is it path length…. Is it special characters?

    if a curl issue, then needs to be raised with the curl team (they release approximately every 2 months)

    If a Kodi issue then will need to be raised on the Kodi forum with a reproducible case.

    but first best share debug logs will be required to analyze further with the current LE13 nightlies.

    Also the results of the “locally executed curl”

  • Okay. Here are the test results for LE13 (alpha):

    A query in the adjusted line curl -k --ftp-ssl --user myusername:mypassword ftp://ftpserver.mine:21 on the SSH console resulted in all elements (files and/or folders) being completely listed. Nothing is missing. Everything is present, even in the deeper directory structures. It seems that Kodi is the issue here.

    Here is a log with component-specific libcURL debugging enabled, which, however, appears unremarkable. Alternatively, I may have made an error in it.



    But back to the current LE12.0.2 with its original curl/8.6.0 version. I now believe I understand why FTPS does not work here. curl version 8.6.0 does not recognize the --ftp-ssl option, which is likely necessary to function with verifypeer=false. Here are two examples that I have tested:

    curl/8.6.0
    LibreELEC:~ # curl -k --ftp-ssl --user myusername:mypassword ftp://ftpserver.mine:21
    curl: option --ftp-ssl: is unknown
    curl: try 'curl --help' for more information
    LibreELEC:~ #

    Meanwhile, curl version 8.5.0 responds as expected, also with the appropriate warning:
    curl/8.5.0 (or curl/8.13.0 in LE13 alpha)
    LibreELEC:~ # curl -k --ftp-ssl --user myusername:mypassword ftp://ftpserver.mine:21
    Warning: --ssl is an insecure option, consider --ssl-reqd instead
    drwxrwxr-x 2 ftp ftp 560 Jan 01 01:02 Folders
    -rwxrw-rw- 1 ftp ftp 418 Jan 01 01:01 Files.xyz
    LibreELEC:~ #

  • I can’t see anything in the log either. Suggest checking in on the Kodi forum for the “missing” file / folders now that we have ruled out curl itself (that doesn’t mean it still might not be curl - but it will be the api of curl)