fauria / docker-vsftpd

🐳 vsftpd Docker image based on Centos 7. Supports passive mode and virtual users.
https://hub.docker.com/r/fauria/vsftpd/
Apache License 2.0
414 stars 341 forks source link

Delaying before reconnect #84

Closed MaxG87 closed 11 months ago

MaxG87 commented 11 months ago

I try to use this container to get a local FTP server for testing purposes. Unfortunately, I cannot get it to work.

My docker-compose.yml is:

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 LANG= lftp "localhost" -p 21100 -u admin,passwd. Once I issue the first command, e.g. ls or PUT file, I get an error message: Delaying before reconnect.

I couldn't find anything helpful in the internet. I only found #1 , but couldn't understand if there was a resolution for that. Is anything known here? Any help would be appreciated.

MaxG87 commented 11 months ago

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.

edit: I copied the issue to StackOverflow too: https://stackoverflow.com/q/77170851/8831116