dockerftpvsftpd

Delaying before reconnect with fauria/vsftpd


I try to use fauria/vsftpd to get a local FTP server for testing purposes. Unfortunately, I cannot get it to work.

For convenience, I put the configuration in a docker-compose.yml. The file is listed below.

# docker-compose.yml
version: "3.7"

services:
  ftp:
    image: fauria/vsftpd:latest
    container_name: vsftpd-compose
    restart: always
    environment:
      - FTP_USER=admin
      - FTP_PASS=passwd
      - PASV_ADDRESS=127.0.0.1
      - PASV_MIN_PORT=21100
      - PASV_MAX_PORT=21110
      - LOG_STDOUT=yes
    ports:
      - 20:20
      - 21:21
      - "21100-21110:21100-21110"

I try to connect to this via lftp "localhost" -p 21100 -u admin,passwd. Once I issue the first command, e.g. ls or PUT file, I get an error message: Pausiere vor erneuter Verbindung (translated: Delaying before reconnect).

How can I get this working?


Solution

  • There are two issues above.

    First, all port mappings must be quoted. I thought only the PASV range must be quoted, but one must use "20:20" and "21:21" too.

    Second, the PASV range must not be used to connect to the FTP. One still must use port 21. Thus, the lftp command is: lftp "localhost" -p 21 -u admin,passwd.