Closed VEINHORN closed 2 years ago
This unfortunately has nothing to do with PASV mode as it also happens for me with the following entry in docker-compose
ftp:
image: fauria/vsftpd
environment:
- FTP_USER=foo
- FTP_PASS=bar
- PASV_ENABLE=NO
- PASV_ADDRESS_RESOLVE=NO
- PASV_ADDR_RESOLVE=NO
- PASV_ADDRESS_ENABLE=NO
ports:
- "8020:20"
- "8021:21"
Result:
ftp> ls
500 Illegal PORT command.
Okay after some deeper research I figured that the linux ftp CLI does apparently not automatically switch to passive mode by somehow communicating with the server. You rather have to explicitly tell it to use passive mode.
So if you go ftp -p hostname port
, then it seemed to work in my configuration with the following docker-compose entry:
ftp:
image: fauria/vsftpd
environment:
- FTP_USER=foo
- FTP_PASS=bar
- PASV_ADDRESS_RESOLVE=YES
- PASV_ADDR_RESOLVE=YES
- PASV_MIN_PORT=21100
- PASV_MAX_PORT=21110
- PASV_ADDRESS_ENABLE=YES
- PASV_ENABLE=YES
- LOG_STDOUT=1
volumes:
- ./support/vsftpd:/home/vsftpd
ports:
- "8020:20"
- "8021:21"
- "21100:21100"
- "21101:21101"
- "21102:21102"
- "21103:21103"
- "21104:21104"
- "21105:21105"
- "21106:21106"
- "21107:21107"
- "21108:21108"
- "21109:21109"
- "21110:21110"
my worked solution
version: "3.3"
services:
ftp:
image: docker.io/fauria/vsftpd:latest
container_name: ftp
environment:
FTP_USER: user
FTP_PASS: password
PASV_ENABLE: "YES"
PASV_ADDRESS: "ftp"
PASV_ADDR_RESOLVE: "YES"
@fauria let's close the issue
Hi @fauria!
When I use docker-vsftpd alogside
docker-compose.yml
I cannot properly use ftpls
command cause I get such error:Part of docker-compose.yml file:
But when I start ftp server with below command it works fine:
I think there are some troubles with address lookup but I couldn't find how to solve it.