Back

Explore Courses Blog Tutorials Interview Questions
0 votes
4 views
in AWS by (19.1k points)

I installed vsftpd on amazon ec2 with fedora instance and it is the latest version but I am getting the error: In CuteFTP:

COMMAND:> PASV 227 Entering Passive Mode (192,168,10,46,14,20)

COMMAND:> LIST

ERROR:> Can’t connect to remote server. Socket error = #10065.

ERROR:> PASV failed, trying PORT.

In Filezilla:

Command: PASV Response: 227 Entering Passive Mode (192,168,10,46,14,20)

Command: LIST Error: Connection timed out

Error: Failed to retrieve directory listing.

Trying to Connect thro' Shell and showing me a list of directories.

1 Answer

0 votes
by (44.4k points)

Just had this same precise issue... this usually only affects GUI FTP clients that use a passive mode (which is pretty common). For instance, when using the standard FTP CLI tool, I was able to successfully log in and transfer files to my FTP server.

The steps to correct are:

1) Add the below settings to your /etc/vsftpd.conf file:

pasv_enable=YES

pasv_min_port=64000

pasv_max_port=64321

port_enable=YES

2) also add one among the following config chunks to your /etc/vsftpd.conf file, based on your scenario (either way, this has to resolve to a public accessible IP):

a:

pasv_address=

pasv_addr_resolve=NO

-OR-

b:

pasv_address=

pasv_addr_resolve=YES

3) In your security group configuration for ec2 instances, add the below custom inbound TCP rules:

  • Enable ports 20-21 for standard ftp
  • Enable your passive ports as defined within the config sections above (I used 64000-64321)

4) Restart your vsftpd service (varies counting on your flavour of Linux)

Note: pasv port range might be visible outside from the firewall, NAT

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
asked Apr 8, 2020 in AWS by chandra (29.3k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...