Copy or Sync from FTP Server results in source directory not found

What is the problem you are having with rclone?

Receiving "error reading source directory: directory not found" when trying to copy or sync from ftp server to unraid server

What is your rclone version (output from rclone version)

  • rclone v1.53.3
  • os/arch: linux/amd64
  • go version: go1.15.5

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

UNRAID V6.8.3

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

Xbox 360 JTAG FTP -> UNRAID Share

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

rclone sync Xbox360: /mnt/user/X360 --dry-run

The rclone config contents with secrets removed.

[Xbox360]
type = ftp
host = 192.168.0.9
user = ***
port = 15
pass = ***
tls = false
explicit_tls = false

A log from the command with the -vv flag

root@Tower:~# rclone sync Xbox360: /mnt/user/X360 --dry-run -vv
2020/11/22 13:58:31 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rcloneorig" "--config" "/boot/config/plugins/rclone/.rclone.conf" "sync" "Xbox360:" "/mnt/user/X360" "--dry-run" "-vv"]
2020/11/22 13:58:31 DEBUG : Using config file from "/boot/config/plugins/rclone/.rclone.conf"
2020/11/22 13:58:31 DEBUG : Creating backend with remote "Xbox360:"
2020/11/22 13:58:31 DEBUG : ftp://192.168.0.9:15: Connecting to FTP server
2020/11/22 13:58:31 DEBUG : Creating backend with remote "/mnt/user/X360"
2020/11/22 13:58:31 DEBUG : ftp://192.168.0.9:15: Connecting to FTP server
2020/11/22 13:58:31 DEBUG : ftp://192.168.0.9:15: Connecting to FTP server
2020/11/22 13:58:31 DEBUG : ftp://192.168.0.9:15: Connecting to FTP server
2020/11/22 13:58:31 DEBUG : ftp://192.168.0.9:15: Connecting to FTP server
2020/11/22 13:58:31 DEBUG : ftp://192.168.0.9:15: Connecting to FTP server
2020/11/22 13:58:31 DEBUG : ftp://192.168.0.9:15: Connecting to FTP server
2020/11/22 13:58:31 ERROR : Game: error reading source directory: directory not found
2020/11/22 13:58:31 ERROR : SysExt: error reading source directory: directory not found
2020/11/22 13:58:31 ERROR : HddX: error reading source directory: directory not found
2020/11/22 13:58:31 ERROR : Usb0: error reading source directory: directory not found

Additional Troubleshooting

I tried many formats using quotes, different / locations. rclone is able to connect fine to the ftp server and read directories. Copy instead of sync results in the same error and so does removing dry run.

The below bug seems similar but none of my directories are empty. Directories are:

  • Game: Files and Folders present
  • Hdd1: Files and Folders present
  • HddX: Only Folders present
  • SysExt: Files and Folders present
  • System: Only Files present
  • Usb0: Only Files present
  • Usb1: Files and Folders present

/t/ftp-empty-directory-yields-directory-not-found-error/12069/6

root@Tower:~# rclone lsd Xbox360: -vv
2020/11/22 13:59:20 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rcloneorig" "--config" "/boot/config/plugins/rclone/.rclone.conf" "lsd" "Xbox360:" "-vv"]
2020/11/22 13:59:20 DEBUG : Using config file from "/boot/config/plugins/rclone/.rclone.conf"
2020/11/22 13:59:20 DEBUG : Creating backend with remote "Xbox360:"
2020/11/22 13:59:20 DEBUG : ftp://192.168.0.9:15: Connecting to FTP server
          -1 1999-12-31 16:00:00        -1 Game
          -1 1999-12-31 16:00:00        -1 Hdd1
          -1 1999-12-31 16:00:00        -1 HddX
          -1 1999-12-31 16:00:00        -1 SysExt
          -1 1999-12-31 16:00:00        -1 System
          -1 1999-12-31 16:00:00        -1 Usb0
          -1 1999-12-31 16:00:00        -1 Usb1
2020/11/22 13:59:20 DEBUG : 2 go routines active

Can you try to copy a single short text file with -vv --dump bodies and post the result please?

It looks like there is some incompatibility between the FTP server and rclone - the log above should help to work out what.

It might be worth trying the latest beta also as there have been some changes in the FTP backend since the release.

There's a problem with the unraid plugin preventing the latest beta from being grabbed. I'll try the beta once it's resolved.

rclone copy Xbox360:Usb0/name.txt /mnt/user/X360 -vv --dump bodies

root@Tower:~# rclone copy Xbox360:Usb0/name.txt /mnt/user/X360 -vv --dump bodies
2020/11/23 05:20:49 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rcloneorig" "--config" "/boot/config/plugins/rclone/.rclone.conf" "copy" "Xbox360:Usb0/name.txt" "/mnt/user/X360" "-vv" "--dump" "bodies"]
2020/11/23 05:20:49 DEBUG : Using config file from "/boot/config/plugins/rclone/.rclone.conf"
2020/11/23 05:20:49 DEBUG : Creating backend with remote "Xbox360:Usb0/name.txt"
2020/11/23 05:20:49 DEBUG : ftp://192.168.0.9:15/Usb0/name.txt: Connecting to FTP server
2020/11/23 05:20:49 DEBUG : FTP Rx: "220 FtpDll Ready"
2020/11/23 05:20:49 DEBUG : FTP Tx: "FEAT"
2020/11/23 05:20:49 DEBUG : FTP Rx: "530 Not logged in"
2020/11/23 05:20:49 DEBUG : FTP Tx: "USER xboxftp"
2020/11/23 05:20:49 DEBUG : FTP Rx: "331 User xboxftp OK, need password"
2020/11/23 05:20:49 DEBUG : FTP Tx: PASS *****
2020/11/23 05:20:49 DEBUG : FTP Rx: "230 User logged in"
2020/11/23 05:20:49 DEBUG : FTP Tx: "TYPE I"
2020/11/23 05:20:49 DEBUG : FTP Rx: "200 Type set to I"
2020/11/23 05:20:49 DEBUG : FTP Tx: "EPSV"
2020/11/23 05:20:49 DEBUG : FTP Rx: "502 Command not found"
2020/11/23 05:20:49 DEBUG : FTP Tx: "PASV"
2020/11/23 05:20:49 DEBUG : FTP Rx: "227 Entering Passive Mode (192,168,0,9,195,81)"
2020/11/23 05:20:49 DEBUG : FTP Tx: "LIST Usb0"
2020/11/23 05:20:49 DEBUG : FTP Rx: "150 Opening connection"
2020/11/23 05:20:49 DEBUG : FTP Rx: "226 Transfer complete"
2020/11/23 05:20:49 DEBUG : Creating backend with remote "/mnt/user/X360"
2020/11/23 05:20:49 DEBUG : FTP Tx: "PASV"
2020/11/23 05:20:49 DEBUG : FTP Rx: "227 Entering Passive Mode (192,168,0,9,195,81)"
2020/11/23 05:20:49 DEBUG : FTP Tx: "LIST Usb0/name.txt"
2020/11/23 05:20:49 DEBUG : FTP Rx: "150 Opening connection"
2020/11/23 05:20:49 DEBUG : FTP Rx: "226 Transfer complete"
2020/11/23 05:20:49 DEBUG : ftp://192.168.0.9:15/Usb0/name.txt: Connecting to FTP server
2020/11/23 05:20:49 DEBUG : FTP Tx: "PASV"
2020/11/23 05:20:49 DEBUG : ftp://192.168.0.9:15/Usb0/name.txt: Connecting to FTP server
2020/11/23 05:20:49 DEBUG : ftp://192.168.0.9:15/Usb0/name.txt: Connecting to FTP server
2020/11/23 05:20:49 DEBUG : ftp://192.168.0.9:15/Usb0/name.txt: Connecting to FTP server
2020/11/23 05:20:49 DEBUG : ftp://192.168.0.9:15/Usb0/name.txt: Connecting to FTP server
2020/11/23 05:20:49 DEBUG : ftp://192.168.0.9:15/Usb0/name.txt: Connecting to FTP server
2020/11/23 05:20:49 DEBUG : FTP Rx: "227 Entering Passive Mode (192,168,0,9,195,81)"
2020/11/23 05:20:49 DEBUG : FTP Rx: "220 FtpDll Ready"
2020/11/23 05:20:49 DEBUG : FTP Tx: "FEAT"
2020/11/23 05:20:49 DEBUG : FTP Rx: "220 FtpDll Ready"
2020/11/23 05:20:49 DEBUG : FTP Tx: "FEAT"
2020/11/23 05:20:49 DEBUG : FTP Rx: "220 FtpDll Ready"
2020/11/23 05:20:49 DEBUG : FTP Tx: "FEAT"
2020/11/23 05:20:49 DEBUG : FTP Rx: "530 Not logged in"
2020/11/23 05:20:49 DEBUG : FTP Tx: "USER xboxftp"
2020/11/23 05:20:49 DEBUG : FTP Rx: "530 Not logged in"
2020/11/23 05:20:49 DEBUG : FTP Rx: "220 FtpDll Ready"
2020/11/23 05:20:49 DEBUG : FTP Tx: "USER xboxftp"
2020/11/23 05:20:49 DEBUG : FTP Tx: "FEAT"
2020/11/23 05:20:49 DEBUG : FTP Rx: "530 Not logged in"
2020/11/23 05:20:49 DEBUG : FTP Tx: "USER xboxftp"
2020/11/23 05:20:49 DEBUG : FTP Rx: "331 User xboxftp OK, need password"
2020/11/23 05:20:49 DEBUG : FTP Tx: PASS *****
2020/11/23 05:20:49 DEBUG : FTP Rx: "530 Not logged in"
2020/11/23 05:20:49 DEBUG : FTP Tx: "USER xboxftp"
2020/11/23 05:20:49 DEBUG : FTP Rx: "331 User xboxftp OK, need password"
2020/11/23 05:20:49 DEBUG : FTP Tx: PASS *****
2020/11/23 05:20:49 DEBUG : FTP Rx: "331 User xboxftp OK, need password"
2020/11/23 05:20:49 DEBUG : FTP Tx: PASS *****
2020/11/23 05:20:49 DEBUG : FTP Rx: "230 User logged in"
2020/11/23 05:20:49 DEBUG : FTP Tx: "TYPE I"
2020/11/23 05:20:49 DEBUG : FTP Rx: "331 User xboxftp OK, need password"
2020/11/23 05:20:49 DEBUG : FTP Tx: PASS *****
2020/11/23 05:20:49 DEBUG : FTP Rx: "230 User logged in"
2020/11/23 05:20:49 DEBUG : FTP Tx: "TYPE I"
2020/11/23 05:20:49 DEBUG : FTP Rx: "230 User logged in"
2020/11/23 05:20:49 DEBUG : FTP Tx: "TYPE I"
2020/11/23 05:20:49 DEBUG : FTP Rx: "200 Type set to I"
2020/11/23 05:20:49 DEBUG : FTP Tx: "EPSV"
2020/11/23 05:20:49 DEBUG : FTP Rx: "230 User logged in"
2020/11/23 05:20:49 DEBUG : FTP Rx: "200 Type set to I"
2020/11/23 05:20:49 DEBUG : FTP Tx: "TYPE I"
2020/11/23 05:20:49 DEBUG : FTP Tx: "EPSV"
2020/11/23 05:20:49 DEBUG : FTP Rx: "200 Type set to I"
2020/11/23 05:20:49 DEBUG : FTP Tx: "EPSV"
2020/11/23 05:20:49 DEBUG : FTP Rx: "502 Command not found"
2020/11/23 05:20:49 DEBUG : FTP Tx: "PASV"
2020/11/23 05:20:49 DEBUG : FTP Rx: "200 Type set to I"
2020/11/23 05:20:49 DEBUG : FTP Tx: "EPSV"
2020/11/23 05:20:49 DEBUG : FTP Rx: "502 Command not found"
2020/11/23 05:20:49 DEBUG : FTP Tx: "PASV"
2020/11/23 05:20:49 DEBUG : FTP Rx: "502 Command not found"
2020/11/23 05:20:49 DEBUG : FTP Tx: "PASV"
2020/11/23 05:20:49 DEBUG : FTP Rx: "550 Unable to enter Passive Mode"
2020/11/23 05:20:49 ERROR : Hdd1: error reading source directory: directory not found
2020/11/23 05:20:49 DEBUG : FTP Rx: "502 Command not found"
2020/11/23 05:20:49 DEBUG : FTP Tx: "PASV"
2020/11/23 05:20:49 DEBUG : FTP Rx: "550 Unable to enter Passive Mode"
2020/11/23 05:20:49 DEBUG : FTP Rx: "550 Unable to enter Passive Mode"
2020/11/23 05:20:49 ERROR : Game: error reading source directory: directory not found
2020/11/23 05:20:49 ERROR : SysExt: error reading source directory: directory not found
2020/11/23 05:20:49 DEBUG : FTP Rx: "550 Unable to enter Passive Mode"
2020/11/23 05:20:49 ERROR : HddX: error reading source directory: directory not found
2020/11/23 05:21:21 DEBUG : FTP Tx: "NOOP"
2020/11/23 05:21:21 ERROR : ftp://192.168.0.9:15/Usb0/name.txt: Error while Dialing 192.168.0.9:15: dial tcp 192.168.0.9:15: connect: connection timed out
2020/11/23 05:21:21 ERROR : ftp://192.168.0.9:15/Usb0/name.txt: Error while Dialing 192.168.0.9:15: dial tcp 192.168.0.9:15: connect: connection timed out
2020/11/23 05:21:21 ERROR : Usb0: error reading source directory: list: ftpConnection Dial: dial tcp 192.168.0.9:15: connect: connection timed out
2020/11/23 05:21:21 ERROR : System: error reading source directory: list: ftpConnection Dial: dial tcp 192.168.0.9:15: connect: connection timed out
2020/11/23 05:21:21 DEBUG : FTP Rx: "200 ori r0, r0, 0"
2020/11/23 05:21:21 ERROR : Usb1: error reading source directory: dial tcp 192.168.0.9:50001: connect: connection timed out
2020/11/23 05:21:21 DEBUG : Local file system at /mnt/user/X360: Waiting for checks to finish
2020/11/23 05:21:21 DEBUG : Local file system at /mnt/user/X360: Waiting for transfers to finish
2020/11/23 05:21:21 INFO : There was nothing to transfer
2020/11/23 05:21:21 ERROR : Attempt 1/3 failed with 8 errors and: march failed with 7 error(s): first error: directory not found
2020/11/23 05:21:21 DEBUG : FTP Tx: "PASV"
2020/11/23 05:21:21 DEBUG : FTP Rx: "550 Unable to enter Passive Mode"
2020/11/23 05:21:21 ERROR : : error reading source directory: directory not found
2020/11/23 05:21:21 DEBUG : Local file system at /mnt/user/X360: Waiting for checks to finish
2020/11/23 05:21:21 DEBUG : Local file system at /mnt/user/X360: Waiting for transfers to finish
2020/11/23 05:21:21 INFO : There was nothing to transfer
2020/11/23 05:21:21 ERROR : Attempt 2/3 failed with 1 errors and: directory not found
2020/11/23 05:21:21 DEBUG : FTP Tx: "PASV"
2020/11/23 05:21:21 DEBUG : FTP Rx: "550 Unable to enter Passive Mode"
2020/11/23 05:21:21 ERROR : : error reading source directory: directory not found
2020/11/23 05:21:21 DEBUG : Local file system at /mnt/user/X360: Waiting for checks to finish
2020/11/23 05:21:21 DEBUG : Local file system at /mnt/user/X360: Waiting for transfers to finish
2020/11/23 05:21:21 INFO : There was nothing to transfer
2020/11/23 05:21:21 ERROR : Attempt 3/3 failed with 1 errors and: directory not found
2020/11/23 05:21:21 INFO :
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors: 1 (retrying may help)
Elapsed time: 31.6s
2020/11/23 05:21:21 DEBUG : 2 go routines active
2020/11/23 05:21:21 Failed to copy: directory not found

It looks like the FTP server does not support passive mode which is the ultimate cause of the problem

That makes it very non-standards compliant!

Unfortunately the FTP library rclone uses doesn't support active mode as active mode very rarely works through NAT gateways.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.