Trying to setup a FTP server on a EC2. I have installed vsftp and followed this tutorial
When I try to connect with the -p option I cannot pass any command. Everything is smooth without it.
I have setup vsftpd.conf:
allow_writeable_chroot=YES
pasv_address=<my-ip>
pasv_enable=Yes
pasv_min_port=50000
pasv_max_port=51000
port_enable=YES
And opened the port (20-21 && 50000-51000 using Terraform here)
resource "aws_security_group" "ftp_passive_port" {
name = "ftp_passive_port"
description = "Access to FTP passive"
vpc_id = aws_vpc.din_vpc.id
ingress {
from_port = 50000
to_port = 51000
protocol = "tcp"
cidr_blocks = [...]
}
Allow all outbound traffic.
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
}
I got this error :
Connected to xxxxxxxx.
220 Welcome to XXXXX FTP service.
Name (xxxxx:qwerty): xxxxxxxxxx
331 Please specify the password.
Password:
230 Login successful.
ftp> ls
227 Entering Passive Mode (0,0,0,0,198,19).
ftp: connect: Connection refused
ftp> bye
221 Goodbye.