0

I am trying to make vsftpd to work with the centos 7 ami from centos. After installing vsftpd I edited the config file and made these changes:

anonymous_enable=NO
local_enable=YES
write_enable=YES

# for ftp passive mode
connect_from_port_20=NO

pasv_enable=YES
pasv_min_port=1024
pasv_max_port=1048
# (ec2 instances public ip)
pasv_address=52.xx.xx.xx

and then I started vsftpd

$ systemctl start vsftpd.service

also opened tcp port range 20-21 and port range 1024-1048 under security groups on AWS website, and set SELinux to permissive

when I try to connect with filezilla I get this error msg

Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Status: Connected
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/home/centos"
Command:    TYPE I
Response:   200 Switching to Binary mode.
Command:    PASV
Response:   227 Entering Passive Mode (0,0,0,0,4,7).
Command:    LIST
Error:  The data connection could not be established: WSAEADDRNOTAVAIL - Cannot assign requested address

I have searched everywhere but have not found a solution to this. Hope someone can help!

I also tried sftp over port 22 with the pem file from amazon. I was able to log in that way, but the file transfer were so insanely slow that I just gave that one up. I tried to upload phpmyadmin and it was seriously going to take 20 minutes to upload it with sftp. Any idea why it is so slow?

Would be very grateful if someone could come with suggestion.

6

This thread is a few months old but I just came across the same problem and manage to solve it.

In vsftpd.conf I disabled IPv6 and enabled IPv4 by changing 2 lines: originally:

listen=NO
listen_ipv6=YES

changed to:

listen=YES
listen_ipv6=NO

Hope that helps!

| improve this answer | |
  • Wow, I tried every recommended answers and spent hours trying to figure out why I can not get passive mode working with all the correct settings, and this is all I needed to change. Thanks – faljbour Sep 12 '18 at 4:32
0

You have to make sure your Security Group for that Instance to reflect your pasv_min_port & pasv_max_port and pasv_address is correct as well.

part of my /etc/vsftpd/vsftpd.conf:

$ sudo grep ^pasv_ /etc/vsftpd/vsftpd.conf 
pasv_max_port=2121
pasv_min_port=2020
pasv_address=54.X.X.X
$

also, make sure you're client is using PASSIVE connection instead of active.

| improve this answer | |
  • I wrote that I allowed tcp ports 20-21 and 1024-1048 under security groups on aws website. did you mean something else maybe? – Alex Feb 25 '15 at 17:50
  • once again, you need to adjust your security group to reflect your pasv_min_port and pasv_max_port not 20, 21 as while you're using ftp you're going passive not active. – alexus Feb 25 '15 at 17:52
  • I am sorry, but I don't understand what you mean. Could you please explain it in a different way? The way I understood it is you telling me I should adjust my security group for my instance to reflect my pasv_min_port & pasv_max_port which in this case is 1024 and 1048. So I went to security group -> inboud -> and added those two ports. I don't understand what you mean. Should I remove port 20 and 21 from the security group? – Alex Feb 25 '15 at 18:02
  • Add Custom TCP Rule with Port Range 1024-1048. – alexus Feb 25 '15 at 18:21
  • I have already done this. – Alex Feb 25 '15 at 18:28
0

it seems a bug. https://trac.filezilla-project.org/ticket/10681

it's remommened to use Filezilla 3.10.2

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.