LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   vsftpd Error: Failed to retrieve directory listing (https://www.linuxquestions.org/questions/linux-server-73/vsftpd-error-failed-to-retrieve-directory-listing-878838/)

jensge994 05-04-2011 03:09 PM

vsftpd Error: Failed to retrieve directory listing
 
hey, im trying to setup an ftp server with vsftpd, it worked find untill suddenly it said "Error: Failed to retrieve directory listing". Im using port 442 atm, but it doesnt work on 21 either.

heres the connection log:

Code:

Status:        Connecting to xx.xxx.xxx.xx...
Status:        Connection established, waiting for welcome message...
Response:        220 Welcome
Command:        USER xxxxxxxxxxxxx
Response:        331 Please specify the password.
Command:        PASS **********
Response:        230 Login successful.
Command:        OPTS UTF8 ON
Response:        200 Always in UTF8 mode.
Status:        Connected
Status:        Retrieving directory listing...
Command:        PWD
Response:        257 "/srv/FileServer"
Command:        TYPE I
Response:        200 Switching to Binary mode.
Command:        PASV
Response:        227 Entering Passive Mode (192,168,1,x,253,xxx).
Status:        Server sent passive reply with unroutable address. Using server address instead.
Command:        LIST
Error:        Connection timed out
Error:        Failed to retrieve directory listing


jensge994 05-04-2011 04:18 PM

btw, it works on the local ip, but it doesnt work on the external ip. The ports are open

Hangdog42 05-04-2011 04:26 PM

[QUOTEjensge994]btw, it works on the local ip, but it doesnt work on the external ip. The ports are open[/QUOTE]

I'd be willing to be the router isn't handling all the ports correctly. If you haven't seen it already, this article give an excellent explanation of both passive and active FTP and what ports need to be open to do it. I know on my FTP server not only do ports 20 and 21 have to be forwarded, but I need to lock vsftpd passv ports down to a set range and then forward those from the router as well.

jensge994 05-08-2011 05:46 AM

passive throttling and passiv ports work! thanks

Ram babu 07-06-2013 05:50 AM

Issue Resolved
 
Check for solution.

Make sure port 20, 21 and few more ports, for example 4242-4243, are being forwarded to the server. We will need these extra ports for passive mode - set pasv_min_port and pasv_max_port accordingly in the configuration file. Add following to /etc/vsftpd.conf .
connect_from_port_20=YES
pasv_enable=YES
pasv_addr_resolve=YES
pasv_address=myaddress.dyndns.com
pasv_min_port=4242
pasv_max_port=4243




Thanks
Ram


All times are GMT -5. The time now is 02:14 PM.