Rclone Serve FTP not working for me

What is the problem you are having with rclone?

When I set up a Google Drive FTP server and connect through it via FileZilla (or any FTP software) it doesn't list the files.
If I use another protocol like http instead of ftp, the files do appear listed.

Run the command 'rclone version' and share the full output of the command.

rclone v1.61.1

  • os/version: ubuntu 20.04 (64 bit)
  • os/kernel: 5.15.0-1025-oracle (aarch64)
  • os/type: linux
  • os/arch: arm64
  • go/version: go1.19.4
  • go/linking: static
  • go/tags: none

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

Google Drive

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


rclone serve ftp CAMERA: --addr 0.0.0.0:8181 --user secretuser --pass secretpass --public-ip xxx.xxx.208.131

The rclone config contents with secrets removed.

[CAMERA]
type = drive
scope = drive
token = {"access_token":"CENSORED","token_type":"Bearer","refresh_token":"CENSORED","expiry":"2023-01-18T21:23:31.552045061+01:00"}
team_drive =
root_folder_id = CENSORED


A log from the command with the -vv flag

2023/01/18 20:30:56 DEBUG : rclone: Version "v1.61.1" starting with parameters ["rclone" "serve" "ftp" "CAMERA:" "--addr" "0.0.0.0:8181" "--user" "CENSORED" "--pass" "CENSORED" "--public-ip" "xxx.xxx.xxx.xxx" "-vv"]
2023/01/18 20:30:56 DEBUG : Creating backend with remote "CAMERA:"
2023/01/18 20:30:56 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2023/01/18 20:30:56 NOTICE: Google drive root '': Serving FTP on 0.0.0.0:8181
2023/01/18 20:30:56 INFO  : : Rclone FTP Server listening on 8181
2023/01/18 20:31:03 DEBUG : : NewDriver: Init driver
2023/01/18 20:31:03 DEBUG : : >NewDriver:
2023/01/18 20:31:03 INFO  : 757594f65c8e075df1ba: Connection Established
2023/01/18 20:31:03 INFO  : 757594f65c8e075df1ba: < 220 Welcome to Rclone v1.61.1 FTP Server
2023/01/18 20:31:03 INFO  : 757594f65c8e075df1ba: > AUTH TLS
2023/01/18 20:31:03 INFO  : 757594f65c8e075df1ba: < 550 Action not taken
2023/01/18 20:31:03 INFO  : 757594f65c8e075df1ba: > AUTH SSL
2023/01/18 20:31:03 INFO  : 757594f65c8e075df1ba: < 550 Action not taken
2023/01/18 20:31:03 INFO  : 757594f65c8e075df1ba: > USER CENSORED
2023/01/18 20:31:03 INFO  : 757594f65c8e075df1ba: < 331 User name ok, password required
2023/01/18 20:31:03 INFO  : 757594f65c8e075df1ba: > PASS ****
2023/01/18 20:31:03 INFO  : 757594f65c8e075df1ba: < 230 Password ok, continue
2023/01/18 20:31:04 INFO  : 757594f65c8e075df1ba: > OPTS UTF8 ON
2023/01/18 20:31:04 INFO  : 757594f65c8e075df1ba: < 200 UTF8 mode enabled
2023/01/18 20:31:04 INFO  : 757594f65c8e075df1ba: > PWD
2023/01/18 20:31:04 INFO  : 757594f65c8e075df1ba: < 257 "/" is the current directory
2023/01/18 20:31:04 INFO  : 757594f65c8e075df1ba: > TYPE I
2023/01/18 20:31:04 INFO  : 757594f65c8e075df1ba: < 200 Type set to binary
2023/01/18 20:31:04 INFO  : 757594f65c8e075df1ba: > PASV
2023/01/18 20:31:04 INFO  : 757594f65c8e075df1ba: < 227 Entering Passive Mode (132,226,208,131,122,199)
2023/01/18 20:31:04 INFO  : 757594f65c8e075df1ba: > LIST
2023/01/18 20:31:04 DEBUG : /: Stat:
2023/01/18 20:31:04 DEBUG : /: >Stat: fi=&{FileInfo:/ mode:2147484141 owner:0 group:0}, err = <nil>
2023/01/18 20:31:04 DEBUG : /: ListDir:
2023/01/18 20:31:04 DEBUG : /: >ListDir: err = <nil>
2023/01/18 20:31:04 INFO  : 757594f65c8e075df1ba: < 150 Opening ASCII mode data connection for file list
2023/01/18 20:31:24 DEBUG : : NewDriver: Init driver
2023/01/18 20:31:24 DEBUG : : >NewDriver:
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: Connection Established
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: < 220 Welcome to Rclone v1.61.1 FTP Server
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: > AUTH TLS
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: < 550 Action not taken
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: > AUTH SSL
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: < 550 Action not taken
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: > USER CENSORED
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: < 331 User name ok, password required
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: > PASS ****
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: < 230 Password ok, continue
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: > OPTS UTF8 ON
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: < 200 UTF8 mode enabled
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: > PWD
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: < 257 "/" is the current directory
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: > TYPE I
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: < 200 Type set to binary
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: > PASV
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: < 227 Entering Passive Mode (132,226,208,131,122,151)
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: > LIST
2023/01/18 20:31:24 DEBUG : /: Stat:
2023/01/18 20:31:24 DEBUG : /: >Stat: fi=&{FileInfo:/ mode:2147484141 owner:0 group:0}, err = <nil>
2023/01/18 20:31:24 DEBUG : /: ListDir:
2023/01/18 20:31:24 DEBUG : /: >ListDir: err = <nil>
2023/01/18 20:31:24 INFO  : f1ba4d554dcb5b3e93f6: < 150 Opening ASCII mode data connection for file list
2023/01/18 20:31:56 DEBUG : Google drive root '': Checking for changes on remote
2023/01/18 20:32:04 INFO  : 757594f65c8e075df1ba: < 226 Closing data connection, sent 214 bytes
2023/01/18 20:32:04 INFO  : 757594f65c8e075df1ba: Connection Terminated
2023/01/18 20:32:24 INFO  : f1ba4d554dcb5b3e93f6: < 226 Closing data connection, sent 214 bytes
2023/01/18 20:32:24 INFO  : f1ba4d554dcb5b3e93f6: Connection Terminated
2023/01/18 20:32:56 DEBUG : Google drive root '': Checking for changes on remote
2023/01/18 20:33:56 DEBUG : Google drive root '': Checking for changes on remote
2023/01/18 20:34:56 DEBUG : Google drive root '': Checking for changes on remote

FileZilla Capture

Estado:	Conectando a 132.226.208.131:8181...
Estado:	Conexión establecida, esperando el mensaje de bienvenida...
Estado:	Servidor no seguro, no soporta FTP sobre TLS.
Estado:	Registrado en
Estado:	Recuperando el listado del directorio...
Comando:	PWD
Respuesta:	257 "/" is the current directory
Comando:	TYPE I
Respuesta:	200 Type set to binary
Comando:	PASV
Respuesta:	227 Entering Passive Mode (xxx,xxx,xxx,xxx,117,217)
Comando:	LIST
Respuesta:	150 Opening ASCII mode data connection for file list
Error:	La conexión superó el tiempo de espera después de 20 segundos de inactividad
Error:	Error al recuperar el listado del directorio
Estado:	Desconectado del servidor
Estado:	Conectando a xxx.xxx.xxx.131:8181...
Estado:	Conexión establecida, esperando el mensaje de bienvenida...
Estado:	Servidor no seguro, no soporta FTP sobre TLS.
Estado:	Registrado en
Estado:	Recuperando el listado del directorio...
Comando:	PWD
Respuesta:	257 "/" is the current directory
Comando:	TYPE I
Respuesta:	200 Type set to binary
Comando:	PASV
Respuesta:	227 Entering Passive Mode (xxx,xxx,xxx,xxx,122,46)
Comando:	LIST
Respuesta:	150 Opening ASCII mode data connection for file list
Error:	La conexión superó el tiempo de espera después de 20 segundos de inactividad
Error:	Error al recuperar el listado del directorio
Estado:	Desconectado del servidor
Estado:	Conectando a xxx.xxx.xxx.131:8181...
Estado:	Conexión establecida, esperando el mensaje de bienvenida...
Estado:	Servidor no seguro, no soporta FTP sobre TLS.
Estado:	Registrado en
Estado:	Recuperando el listado del directorio...
Comando:	PWD
Respuesta:	257 "/" is the current directory
Comando:	TYPE I
Respuesta:	200 Type set to binary
Comando:	PASV
Respuesta:	227 Entering Passive Mode (xxx,xxx,xxx,xxx,122,199)
Comando:	LIST
Respuesta:	150 Opening ASCII mode data connection for file list
Error:	La conexión superó el tiempo de espera después de 20 segundos de inactividad
Error:	Error al recuperar el listado del directorio
Estado:	Desconectado del servidor
Estado:	Conectando a xxx.xxx.xxx.xxx:8181...
Estado:	Conexión establecida, esperando el mensaje de bienvenida...
Estado:	Servidor no seguro, no soporta FTP sobre TLS.
Estado:	Registrado en
Estado:	Recuperando el listado del directorio...
Comando:	PWD
Respuesta:	257 "/" is the current directory
Comando:	TYPE I
Respuesta:	200 Type set to binary
Comando:	PASV
Respuesta:	227 Entering Passive Mode (xxx,xxx,xxx,131,122,151)
Comando:	LIST
Respuesta:	150 Opening ASCII mode data connection for file list
Error:	La conexión superó el tiempo de espera después de 20 segundos de inactividad
Error:	Error al recuperar el listado del directorio

This is a timeout.

It is most likely firewalling of FTP's ports.

You need to open the passive range of ports in the firewall

      --passive-port string                    Passive port range to use (default "30000-32000")

Or make sure you've loaded the FTP modules if you are using a connection tracking firewall.

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