Struggling with FTP for windows ce: no files found

What is the problem you are having with rclone?

I'm trying to syncronize data from a device with an embedded windows ce 'computer' to google drive via rclone on a raspberry pi. The device is connected via ethernet with a fixed ip. The internet connection is via wifi and a 4G modem. Everything works smoothly except the ftp connection with the device.
I can connect via telnet to the device and see the file I'm looking for. But via FTP I'm unable to list any file via rclone ls device: or rclone ls device:'/dir' or rclone ls device:'\dir' or rclone ls device:'c:\dir'

What is your rclone version (output from rclone version)

rclone v1.53.3

  • os/arch: linux/arm
  • go version: go1.15.5

Which OS you are using and how many bits (eg Windows 7, 64 bit)

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"

Which cloud storage system are you using? (eg Google Drive)

FTP as source
Google Drive as Target

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone copy pentalum:'/Storage Card' gdrive:/pentalum

The rclone config contents with secrets removed.

{
    "gdrive": {
        "client_id": ...,
        "client_secret": ...,
        "scope": "drive",
        "token": "{...}",
        "type": "drive"
    },
    "pentalum": {
        "disable_epsv": "true",
        "host": "192.168.1.1",
        "pass": "...",
        "port": "21",
        "type": "ftp",
        "user": "..."

A log from the command with the -vv flag

2021/01/14 21:26:09 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "copy" "pentalum:c:\\Storage Card" "gdrive:pentalum" "-vv"]
2021/01/14 21:26:09 DEBUG : Using config file from "/home/dev/.config/rclone/rclone.conf"
2021/01/14 21:26:09 DEBUG : Creating backend with remote "pentalum:c:\\Storage Card"
2021/01/14 21:26:09 DEBUG : ftp://192.168.1.1:21/c:\Storage Card: Connecting to FTP server
2021/01/14 21:26:09 DEBUG : Creating backend with remote "gdrive:pentalum"
2021/01/14 21:26:10 DEBUG : Google drive root 'pentalum': root_folder_id = "0AHPnxqOzIkY-Uk9PVA" - save this in the config to speed up startup
2021/01/14 21:26:14 ERROR : : error reading source directory: list: dirExists: 226 Closing data connection. 
2021/01/14 21:26:14 DEBUG : Google drive root 'pentalum': Waiting for checks to finish
2021/01/14 21:26:14 DEBUG : Google drive root 'pentalum': Waiting for transfers to finish
2021/01/14 21:26:14 INFO  : There was nothing to transfer
2021/01/14 21:26:14 ERROR : Attempt 1/3 failed with 1 errors and: list: dirExists: 226 Closing data connection. 
2021/01/14 21:26:14 ERROR : : error reading source directory: 227 Entering Passive Mode (192,168,1,1,192,19).
2021/01/14 21:26:14 DEBUG : Google drive root 'pentalum': Waiting for checks to finish
2021/01/14 21:26:14 DEBUG : Google drive root 'pentalum': Waiting for transfers to finish
2021/01/14 21:26:14 INFO  : There was nothing to transfer
2021/01/14 21:26:14 ERROR : Attempt 2/3 failed with 1 errors and: 227 Entering Passive Mode (192,168,1,1,192,19).
2021/01/14 21:27:13 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Elapsed time:       1m3.4s

hello and welcome to the forum,

the command and the log show two different source folders?
pentalum:'/Storage Card'
pentalum:c:\\Storage Card

perhaps get rclone ls working, then try rclone copy

this for quick feedback. I already tried with ls but no files are shown form the target. when I connect with FileZilla on the same raspi I can see all directories and files...

but which source, the first one or the second one?

and with filezilla, what is the root folder?

with rclone ls pentalum:'/Storage Card' I get 'last error was: directory not found'
with rclone ls pentalum:'c:\Storage Card' I get 'list: dirExists: 226 Closing data connection.'
in FileZilla the directory is '/Storage Card'

is that on the root of the file system, or relative to the user home dir?

Sorry for very late reply. When I log on to the source via telnet /Storage Card is a directory under the root of the user.

there is a difference betweean
pentalum:/Storage Card
and
pentalum:Storage Card

https://rclone.org/ftp/
"If the path does not begin with a / it is relative to the home directory of the user."

Thank your for the hint. When I logon to the source via Filezilla from the same raspberry and with the same user/id password, I can perfectly see the /Storage Card directory. Rclone via FTP with exactly the same user and pew should give the same result I presume

with rclone, did you try both ways, with and without the leading slash?

see log
...
ev@raspberrypi:~ $ rclone ls pentalum:'Storage Card' -vv
2021/01/19 22:07:03 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "ls" "pentalum:Storage Card" "-vv"]
2021/01/19 22:07:03 DEBUG : Using config file from "/home/dev/.config/rclone/rclone.conf"
2021/01/19 22:07:03 DEBUG : Creating backend with remote "pentalum:Storage Card"
2021/01/19 22:07:03 DEBUG : ftp://192.168.1.1:21/Storage Card: Connecting to FTP server
2021/01/19 22:07:03 ERROR : : error listing: directory not found
2021/01/19 22:07:03 DEBUG : 2 go routines active
2021/01/19 22:07:03 Failed to ls with 2 errors: last error was: directory not found
dev@raspberrypi:~ $ rclone ls pentalum:'/Storage Card' -vv
2021/01/19 22:07:17 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "ls" "pentalum:/Storage Card" "-vv"]
2021/01/19 22:07:17 DEBUG : Using config file from "/home/dev/.config/rclone/rclone.conf"
2021/01/19 22:07:17 DEBUG : Creating backend with remote "pentalum:/Storage Card"
2021/01/19 22:07:17 DEBUG : ftp://192.168.1.1:21/Storage Card: Connecting to FTP server
2021/01/19 22:07:17 ERROR : : error listing: directory not found
2021/01/19 22:07:17 DEBUG : 2 go routines active
2021/01/19 22:07:17 Failed to ls with 2 errors: last error was: directory not found
...

what is the output of
rclone lsd pentalum:/ -vv
rclone lsd pentalum: -vv

dev@raspberrypi:~ $ rclone lsd pentalum:/ -vv
2021/01/19 22:14:27 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "lsd" "pentalum:/" "-vv"]
2021/01/19 22:14:27 DEBUG : Using config file from "/home/dev/.config/rclone/rclone.conf"
2021/01/19 22:14:27 DEBUG : Creating backend with remote "pentalum:/"
2021/01/19 22:14:27 DEBUG : ftp://192.168.1.1:21: Connecting to FTP server
2021/01/19 22:14:27 DEBUG : 2 go routines active
dev@raspberrypi:~ $ rclone lsd pentalum: -vv
2021/01/19 22:14:48 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "lsd" "pentalum:" "-vv"]
2021/01/19 22:14:48 DEBUG : Using config file from "/home/dev/.config/rclone/rclone.conf"
2021/01/19 22:14:48 DEBUG : Creating backend with remote "pentalum:"
2021/01/19 22:14:48 DEBUG : ftp://192.168.1.1:21: Connecting to FTP server
2021/01/19 22:14:48 DEBUG : 2 go routines active

this is very strange problem.

is the ftp server using any type of ftp over tls?

i would remove port": "21", from the config file, no need for it there.

https://rclone.org/ftp/#limitations
i would read that section, about the debug flags and test with them.

perhaps this might spark an idea?
Error reading source directory: 425 Can't open data connection for transfer of - #5 by Animosity022

Thxs for the extra hints and tips. But I gave up. I quickly tested with a simple python script using ftplib and I can browse all directories without any problem. The sync with google drive will still be done with rclone.

If you want to debug further, try the listing with -vv --dump bodies which will show the FTP commands and responses.

Hi Nick, you've motivated me to try again;-) This is the result. I'm not that familiar with the details of ftp to find out what's going wrong.
ev@raspberrypi:~ $ rclone ls pentalum:'c:\Windows' -vv --dump bodies
2021/01/21 10:26:13 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "ls" "pentalum:c:\Windows" "-vv" "--dump" "bodies"]
2021/01/21 10:26:13 DEBUG : Using config file from "/home/dev/.config/rclone/rclone.conf"
2021/01/21 10:26:13 DEBUG : Creating backend with remote "pentalum:c:\Windows"
2021/01/21 10:26:13 DEBUG : ftp://192.168.1.1:21/c:\Windows: Connecting to FTP server
2021/01/21 10:26:13 DEBUG : FTP Rx: "220 Service ready for new user."
2021/01/21 10:26:13 DEBUG : FTP Tx: "FEAT"
2021/01/21 10:26:13 DEBUG : FTP Rx: "500 Syntax error, command unrecognized."
2021/01/21 10:26:13 DEBUG : FTP Tx: "USER pentalum"
2021/01/21 10:26:13 DEBUG : FTP Rx: "331 User name okay, need password."
2021/01/21 10:26:13 DEBUG : FTP Tx: PASS *****
2021/01/21 10:26:13 DEBUG : FTP Rx: "230 User logged in, proceed."
2021/01/21 10:26:13 DEBUG : FTP Tx: "TYPE I"
2021/01/21 10:26:13 DEBUG : FTP Rx: "200 Command okay."
2021/01/21 10:26:13 DEBUG : FTP Tx: "PASV"
2021/01/21 10:26:13 DEBUG : FTP Rx: "227 Entering Passive Mode (192,168,1,1,196,136)."
2021/01/21 10:26:13 DEBUG : FTP Tx: "LIST ."
2021/01/21 10:26:13 DEBUG : FTP Rx: "125 Data connection already open; transfer starting."
2021/01/21 10:26:13 DEBUG : FTP Rx: "226 Closing data connection. "
2021/01/21 10:26:13 DEBUG : FTP Tx: "PASV"
2021/01/21 10:26:13 DEBUG : FTP Rx: "227 Entering Passive Mode (192,168,1,1,196,137)."
2021/01/21 10:26:13 DEBUG : FTP Tx: "LIST c:\Windows"
2021/01/21 10:26:13 DEBUG : FTP Rx: "125 Data connection already open; transfer starting."
2021/01/21 10:26:13 DEBUG : FTP Rx: "450 File unavailable (e.g., file busy)."
2021/01/21 10:26:13 DEBUG : FTP Tx: "PASV"
2021/01/21 10:26:13 DEBUG : FTP Rx: "226 Closing data connection. "
2021/01/21 10:26:13 ERROR : : error listing: list: dirExists: 226 Closing data connection.
2021/01/21 10:26:13 DEBUG : 2 go routines active
2021/01/21 10:26:13 Failed to ls with 2 errors: last error was: list: dirExists: 226 Closing data connection.

Things look normal up to this point

It appears rclone has got out of sync with the ftp server at this point - the 450 File unavailable message has confused one or the other end.

I think the root of the problem is this

What happens if you do this?

rclone lsf pentalum: -vv --dump bodies

How about this

rclone lsf pentalum:/ -vv --dump bodies

or this

rclone lsf pentalum:/Windows -vv --dump bodies

This for the extra effort...

rclone lsf pentalum: -vv --dump bodies

2021/01/22 17:28:05 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "lsf" "pentalum:" "-vv" "--dump" "bodies"]
2021/01/22 17:28:05 DEBUG : Using config file from "/home/dev/.config/rclone/rclone.conf"
2021/01/22 17:28:05 DEBUG : Creating backend with remote "pentalum:"
2021/01/22 17:28:05 DEBUG : ftp://192.168.1.1:21: Connecting to FTP server
2021/01/22 17:28:05 DEBUG : FTP Rx: "220 Service ready for new user."
2021/01/22 17:28:05 DEBUG : FTP Tx: "FEAT"
2021/01/22 17:28:05 DEBUG : FTP Rx: "500 Syntax error, command unrecognized."
2021/01/22 17:28:05 DEBUG : FTP Tx: "USER pentalum"
2021/01/22 17:28:05 DEBUG : FTP Rx: "331 User name okay, need password."
2021/01/22 17:28:05 DEBUG : FTP Tx: PASS *****
2021/01/22 17:28:05 DEBUG : FTP Rx: "230 User logged in, proceed."
2021/01/22 17:28:05 DEBUG : FTP Tx: "TYPE I"
2021/01/22 17:28:05 DEBUG : FTP Rx: "200 Command okay."
2021/01/22 17:28:05 DEBUG : FTP Tx: "PASV"
2021/01/22 17:28:05 DEBUG : FTP Rx: "227 Entering Passive Mode (192,168,1,1,196,150)."
2021/01/22 17:28:05 DEBUG : FTP Tx: "LIST "
2021/01/22 17:28:05 DEBUG : FTP Rx: "125 Data connection already open; transfer starting."
2021/01/22 17:28:05 DEBUG : FTP Rx: "226 Closing data connection. "
2021/01/22 17:28:05 DEBUG : 2 go routines

rclone lsf pentalum:/ -vv --dump bodies

2021/01/22 17:31:50 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "lsf" "pentalum:/" "-vv" "--dump" "bodies"]
2021/01/22 17:31:50 DEBUG : Using config file from "/home/dev/.config/rclone/rclone.conf"
2021/01/22 17:31:50 DEBUG : Creating backend with remote "pentalum:/"
2021/01/22 17:31:50 DEBUG : ftp://192.168.1.1:21: Connecting to FTP server
2021/01/22 17:31:50 DEBUG : FTP Rx: "220 Service ready for new user."
2021/01/22 17:31:50 DEBUG : FTP Tx: "FEAT"
2021/01/22 17:31:50 DEBUG : FTP Rx: "500 Syntax error, command unrecognized."
2021/01/22 17:31:50 DEBUG : FTP Tx: "USER pentalum"
2021/01/22 17:31:50 DEBUG : FTP Rx: "331 User name okay, need password."
2021/01/22 17:31:50 DEBUG : FTP Tx: PASS *****
2021/01/22 17:31:50 DEBUG : FTP Rx: "230 User logged in, proceed."
2021/01/22 17:31:50 DEBUG : FTP Tx: "TYPE I"
2021/01/22 17:31:50 DEBUG : FTP Rx: "200 Command okay."
2021/01/22 17:31:50 DEBUG : FTP Tx: "PASV"
2021/01/22 17:31:50 DEBUG : FTP Rx: "227 Entering Passive Mode (192,168,1,1,196,151)."
2021/01/22 17:31:50 DEBUG : FTP Tx: "LIST /"
2021/01/22 17:31:50 DEBUG : FTP Rx: "125 Data connection already open; transfer starting."
2021/01/22 17:31:50 DEBUG : FTP Rx: "226 Closing data connection. "
2021/01/22 17:31:50 DEBUG : 2 go routines active

rclone lsf pentalum:/Windows -vv --dump bodies
2021/01/22 17:33:28 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "lsf" "pentalum:/Windows" "-vv" "--dump" "bodies"]
2021/01/22 17:33:28 DEBUG : Using config file from "/home/dev/.config/rclone/rclone.conf"
2021/01/22 17:33:28 DEBUG : Creating backend with remote "pentalum:/Windows"
2021/01/22 17:33:28 DEBUG : ftp://192.168.1.1:21/Windows: Connecting to FTP server
2021/01/22 17:33:28 DEBUG : FTP Rx: "220 Service ready for new user."
2021/01/22 17:33:28 DEBUG : FTP Tx: "FEAT"
2021/01/22 17:33:28 DEBUG : FTP Rx: "500 Syntax error, command unrecognized."
2021/01/22 17:33:28 DEBUG : FTP Tx: "USER pentalum"
2021/01/22 17:33:28 DEBUG : FTP Rx: "331 User name okay, need password."
2021/01/22 17:33:28 DEBUG : FTP Tx: PASS *****
2021/01/22 17:33:28 DEBUG : FTP Rx: "230 User logged in, proceed."
2021/01/22 17:33:28 DEBUG : FTP Tx: "TYPE I"
2021/01/22 17:33:28 DEBUG : FTP Rx: "200 Command okay."
2021/01/22 17:33:28 DEBUG : FTP Tx: "PASV"
2021/01/22 17:33:28 DEBUG : FTP Rx: "227 Entering Passive Mode (192,168,1,1,196,152)."
2021/01/22 17:33:28 DEBUG : FTP Tx: "LIST /"
2021/01/22 17:33:28 DEBUG : FTP Rx: "125 Data connection already open; transfer starting."
2021/01/22 17:33:28 DEBUG : FTP Rx: "226 Closing data connection. "
2021/01/22 17:33:28 DEBUG : FTP Tx: "PASV"
2021/01/22 17:33:28 DEBUG : FTP Rx: "227 Entering Passive Mode (192,168,1,1,196,153)."
2021/01/22 17:33:28 DEBUG : FTP Tx: "LIST /Windows"
2021/01/22 17:33:28 DEBUG : FTP Rx: "125 Data connection already open; transfer starting."
2021/01/22 17:33:28 DEBUG : FTP Rx: "226 Closing data connection. "
2021/01/22 17:33:28 DEBUG : FTP Tx: "PASV"
2021/01/22 17:33:28 DEBUG : FTP Rx: "227 Entering Passive Mode (192,168,1,1,196,154)."
2021/01/22 17:33:28 DEBUG : FTP Tx: "LIST /"
2021/01/22 17:33:28 DEBUG : FTP Rx: "125 Data connection already open; transfer starting."
2021/01/22 17:33:28 DEBUG : FTP Rx: "226 Closing data connection. "
2021/01/22 17:33:28 ERROR : : error listing: directory not found
2021/01/22 17:33:28 DEBUG : 2 go routines active
2021/01/22 17:33:28 Failed to lsf with 2 errors: last error was: error in ListJSON: directory not found

Hmm, this appears to be working, it just hasn't found a directory to list.

What directories should there be to list?

Should there be any files?

Did you try with a different FTP client? Did that show any files?