Ftp client error

What is the problem you are having with rclone?

hi all, I would like to ask a question with the ftp configuration with rclone, configuring ftp and tried to connect I get this error message, any ideas to solve it? Thank you

ERROR:: error listing: 500 You need to use a client supporting PRET (PRE Transfer) to use PASV
2020/09/08 16:24:43 Failed to lsd with 2 errors: last error was: 500 You need to use a client supporting PRET (PRE Transfer) to use PASV

What is your rclone version (output from rclone version)

1.53.0

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

Linux Ubuntu 64 bit

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

Ftp

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

rclone ls ftptest:

The rclone config contents with secrets removed.


```[gdrive]
type = drive
client_id =
client_secret =
token = {"access_token":"token

[ftptest]
type = ftp
host = server
user = username
port = 2121
pass = password
tls = false
explicit_tls = true
no_check_certificate = true
disable_epsv = true



#### A log from the command with the `-vv` flag  
<!-- You should use 3 backticks to begin and end your paste to make it readable.  Or use a service such as https://pastebin.com or https://gist.github.com/   -->

rclone: Version "v1.53.0" starting with parameters ["rclone" "-vv" "ls" "ftptest:"]
2020/09/08 19:58:42 DEBUG : Using config file from "/home/rclone/.config/rclone/rclone.conf"
2020/09/08 19:58:42 DEBUG : Creating backend with remote "ftptest:"
2020/09/08 19:58:42 DEBUG : ftp://serverftp:2121: Connecting to FTP server
2020/09/08 19:58:44 ERROR : : error listing: 500 You need to use a client supporting PRET (PRE Transfer) to use PASV
2020/09/08 19:58:44 DEBUG : 2 go routines active
2020/09/08 19:58:44 Failed to ls with 2 errors: last error was: 500 You need to use a client supporting PRET (PRE Transfer) to use PASV

hello and welcome to the forum,

are you able to login to the ftp using another client?

what is the software use to run the ftp server?

The library rclone is using doesn't support PRET

It would be a reasonably straight forward patch though.

Is there a server I can try this on? PM me a login if you can!

Thanks for your answer, unfortunately for security reasons I prefer to avoid giving credentials, I have sensitive material, if you tell me how to do it I can do it without problems, thanks a lot

Thanks for your answer, yes using other clients I can log in safely, the server uses drftpd + 2.0 stable I hope you can help me thank you very much

Ok give this a go (completely untested!)

v1.54.0-beta.4768.ac7ba58ad.fix-ftp-PRET on branch fix-ftp-PRET (uploaded in 15-30 mins)

If it doesn't work can you send the output with -vv --dump bodies - thanks!

Thank you so much for helping me, as soon as I have time I'll try if it works Could you please email me how to install your beta version instead of the current one? Thanks so much

OK that beta didn't build, try this one instead

v1.54.0-beta.4770.1ee3d6057.fix-ftp-PRET on branch fix-ftp-PRET (uploaded in 15-30 mins)

To install - download the zip file for your architecture and follow the instructions here: https://rclone.org/install/#linux-installation-from-precompiled-binary

There are instructions for most OSes on that page. Basically unzip the file and run the binary - you don't actually need to install anything.

172/5000

hello, thanks for helping me, this morning I tried with the new version but unfortunately the same errors appear in the PRET support, later I leave you the logs. Thanks so much

rclone -vv --dump bodies lsd ftpnew:
2020/09/12 08:37:11 DEBUG : rclone: Version "v1.54.0-beta.4770.1ee3d6057.fix-ftp -PRET" starting with parameters ["rclone" "-vv" "--dump" "bodies" "lsd" "ftpnew: "]
2020/09/12 08:37:11 DEBUG : Using config file from "/root/.config/rclone/rclone. conf"
2020/09/12 08:37:11 DEBUG : Creating backend with remote "ftpnew:"
2020/09/12 08:37:11 DEBUG : ftp://serverftp:2121: Connecting to FTP server
2020/09/12 08:37:11 DEBUG : FTP Rx: "220 DrFTPD+ 2.0 (+STABLE+) $Revision: 1949 $ http://drftpd.org"
2020/09/12 08:37:11 DEBUG : FTP Tx: "AUTH TLS"
2020/09/12 08:37:11 DEBUG : FTP Rx: "234 AUTH TLS successful"
2020/09/12 08:37:11 DEBUG : FTP Tx: "FEAT"
2020/09/12 08:37:11 DEBUG : FTP Rx: "530 Not logged in."
2020/09/12 08:37:11 DEBUG : FTP Tx: "USER User"
2020/09/12 08:37:11 DEBUG : FTP Rx: "331 Password required for User."
2020/09/12 08:37:11 DEBUG : FTP Tx: PASS *****
2020/09/12 08:37:11 DEBUG : FTP Rx: "230- "
2020/09/12 08:37:11 DEBUG : FTP Rx: "230- \\|//"
2020/09/12 08:37:11 DEBUG : FTP Rx: "230- (` o-o ')"
2020/09/12 08:37:11 DEBUG : FTP Rx: "230- -------------------------------ooO-(_) -Ooo---------"
2020/09/12 08:37:11 DEBUG : FTP Rx: "230- Welcome iN FTP ELIRIUM"
2020/09/12 08:37:11 DEBUG : FTP Rx: "230- -------------------------------------- ------------- "
2020/09/12 08:37:11 DEBUG : FTP Rx: "230 User logged in successfully."
2020/09/12 08:37:11 DEBUG : FTP Tx: "TYPE I"
2020/09/12 08:37:11 DEBUG : FTP Rx: "200 Command okay"
2020/09/12 08:37:11 DEBUG : FTP Tx: "PBSZ 0"
2020/09/12 08:37:11 DEBUG : FTP Rx: "200 Command okay"
2020/09/12 08:37:11 DEBUG : FTP Tx: "PROT P"
2020/09/12 08:37:11 DEBUG : FTP Rx: "200 Command okay"
2020/09/12 08:37:11 DEBUG : FTP Tx: "EPSV"
2020/09/12 08:37:11 DEBUG : FTP Rx: "500 No command handler for EPSV"
2020/09/12 08:37:11 DEBUG : FTP Tx: "PASV"
2020/09/12 08:37:12 DEBUG : FTP Rx: "500 You need to use a client supporting PRE T (PRE Transfer) to use PASV"
2020/09/12 08:37:12 ERROR : : error listing: 500 You need to use a client suppor ting PRET (PRE Transfer) to use PASV
2020/09/12 08:37:12 DEBUG : 2 go routines active
2020/09/12 08:37:12 Failed to lsd with 2 errors: last error was: 500 You need to use a client supporting PRET (PRE Transfer) to use PASV

Ah OK!

Can you try this now please - same drill!

v1.54.0-beta.4770.976c36c83.fix-ftp-PRET on branch fix-ftp-PRET (uploaded in 15-30 mins)

Thank you very much, now no error appears about PRET, but this error appears, how can it be solved? Thanks so much

rclone -vv --dump bodies lsd ftpnew:
2020/09/12 20:29:49 DEBUG : rclone: Version "v1.54.0-beta.4770.976c36c83.fix-ftp -PRET" starting with parameters ["rclone" "-vv" "--dump" "bodies" "lsd" "ftpnew: "]
2020/09/12 20:29:49 DEBUG : Using config file from "/root/.config/rclone/rclone. conf"
2020/09/12 20:29:49 DEBUG : Creating backend with remote "ftpnew:"
2020/09/12 20:29:49 DEBUG : ftp://serverftp:2121: Connecting to FTP server
2020/09/12 20:29:49 DEBUG : FTP Rx: "220 DrFTPD+ 2.0 (+STABLE+) $Revision: 1949 $ http://drftpd.org"
2020/09/12 20:29:49 DEBUG : FTP Tx: "AUTH TLS"
2020/09/12 20:29:49 DEBUG : FTP Rx: "234 AUTH TLS successful"
2020/09/12 20:29:49 DEBUG : FTP Tx: "USER User"
2020/09/12 20:29:49 DEBUG : FTP Rx: "331 Password required for Style."
2020/09/12 20:29:49 DEBUG : FTP Tx: PASS *****
2020/09/12 20:29:49 DEBUG : FTP Rx: "230- "
2020/09/12 20:29:49 DEBUG : FTP Rx: "230- \\|//"
2020/09/12 20:29:49 DEBUG : FTP Rx: "230- (` o-o ')"
2020/09/12 20:29:49 DEBUG : FTP Rx: "230- -------------------------------ooO-(_) -Ooo---------"
2020/09/12 20:29:49 DEBUG : FTP Rx: "230- Welcome iN #FTP ELIRIUM"
2020/09/12 20:29:49 DEBUG : FTP Rx: "230- -------------------------------------- ------------- "
2020/09/12 20:29:49 DEBUG : FTP Rx: "230 User logged in successfully."
2020/09/12 20:29:49 DEBUG : FTP Tx: "FEAT"
2020/09/12 20:29:49 DEBUG : FTP Rx: "211-Extensions supported:"
2020/09/12 20:29:49 DEBUG : FTP Rx: " MLST type*,x.crc32*,size*,modify*,unix.own er*,unix.group*,x.slaves*,x.xfertime*"
2020/09/12 20:29:49 DEBUG : FTP Rx: " PRET"
2020/09/12 20:29:49 DEBUG : FTP Rx: " AUTH SSL"
2020/09/12 20:29:49 DEBUG : FTP Rx: " PBSZ"
2020/09/12 20:29:49 DEBUG : FTP Rx: " CPSV"
2020/09/12 20:29:49 DEBUG : FTP Rx: " SSCN"
2020/09/12 20:29:49 DEBUG : FTP Rx: " CLNT"
2020/09/12 20:29:49 DEBUG : FTP Rx: " NOOP"
2020/09/12 20:29:49 DEBUG : FTP Rx: "211 End"
2020/09/12 20:29:49 DEBUG : FTP Tx: "TYPE I"
2020/09/12 20:29:49 DEBUG : FTP Rx: "200 Command okay"
2020/09/12 20:29:49 DEBUG : FTP Tx: "PBSZ 0"
2020/09/12 20:29:49 DEBUG : FTP Rx: "200 Command okay"
2020/09/12 20:29:49 DEBUG : FTP Tx: "PROT P"
2020/09/12 20:29:50 DEBUG : FTP Rx: "200 Command okay"
2020/09/12 20:29:50 DEBUG : FTP Tx: "PRET MLSD "
2020/09/12 20:29:50 DEBUG : FTP Tx: "PASV"
2020/09/12 20:29:50 DEBUG : FTP Rx: "200 OK, will use master for upcoming transf er"
2020/09/12 20:29:50 ERROR : : error listing: 200 OK, will use master for upcomin g transfer
2020/09/12 20:29:50 DEBUG : 2 go routines active
2020/09/12 20:29:50 Failed to lsd with 2 errors: last error was: 200 OK, will us

Thanks for that. I can see I messed up the response from PRET, I'll have another go tomorrow.

Imagine, it's a pleasure to collaborate :slight_smile: ok I await your news, see you tomorrow;)

OK here we go again :crossed_fingers:

v1.54.0-beta.4770.f8436468a.fix-ftp-PRET on branch fix-ftp-PRET (uploaded in 15-30 mins)

hello, sorry if I answer now, I came home a little while ago, I wanted to inform you that it works now and gives no errors, thank you very much, when will you release the stable version at this point? Thank you

Great!

Thanks for testing :slight_smile:

I'll submit that patch to the upstream project.

This won't hit the master branch until it is merged upstream and then will go into 1.54 I think.

Do not worry :slight_smile: , it's a pleasure. I wanted to ask you if you could please help me for a script in bash that syncs new files from my ftp server to google drive. Thanks so much

hi,
i suggest that you open a new post, as more forum users will see it.

Note that PRET support has hit the latest beta now and will be in 1.54 :slight_smile:

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