A General (VsFTPD or ProFTPD) problem

I’m having a massive issue regards installing FTP correctly. What’s happening is, i’m able to login successfully, but at the point when it lists the directories, it times out/freezes/disconnects. Is there something wrong?

This is the FileZilla FTP Log:

Response: 220 FTP Server ready.
Command: USER testuser
Response: 331 Password required for testuser
Command: PASS ********
Response: 230 User testuser logged in.
Command: SYST
Response: 215 UNIX Type: L8
Command: FEAT
Response: 211-Features:
Response: MDTM
Response: MFMT
Response: TVFS
Response: MFF modify;UNIX.group;UNIX.mode;
Response: MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
Response: REST STREAM
Response: SIZE
Response: 211 End
Status: Connected
Status: Retrieving directory listing…
Command: PWD
Response: 257 “/” is the current directory
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode (80,83,121,240,169,0).
Command: MLSD
Error: Connection timed out
Error: Failed to retrieve directory listing

What the hell is going on?

I’m running:

Webmin, with Virtualmin Module. ProFTPD. I’m creating the account using the Virtualmin Module.

Howdy,

That can happen when there’s a problem with the FTP connection type in use and the network topology conflict in some way… one solution would be to try configuring your FTP client to use Active mode rather than Passive mode.

Another thing that sometimes works is to load the FTP connection tracking kernel module. To do that, log into your server as root over SSH, and run this command:

modprobe nf_conntrack_ftp

After running that, try connecting via FTP again and see if that does the trick!

-Eric

Both suggestions failed.

FATAL: Could not load /lib/modules/2.6.18-194.8.1.el5.028stab070.5/modules.dep: No such file or directory

was the result of the second suggestion.

Howdy,

Somethings awry if it can’t find your module dependencies… did you by chance update your kernel recently, but not reboot your server? That’s one thing that could cause the above error.

You could try running the command “depmod -a” to rebuild them… but if that doesn’t work, something else is incorrect, which may or may not be resolved by rebooting :slight_smile:

-Eric

Well i remember it detecting CentOS 5.5 (Webmin) but my VPS panel says it’s 5.4.

Not sure how that affects.

Like Eric said all correctly, this is like an issue of connectivity of your server. Is that server located behind a firewall / a NAT router?

Switching to Active mode will only be successful if the client is either not behind a NAT router, or has appropriate FTP protocol support in the router (kinda what the conntrack module does for the server), or you set up a port forwarding and configure the client to use a specific active mode port range (and the external IP instead of LAN IP). Many FTP clients nowadays offer those features, as does the ProFTPD server.

(Yes, FTP can be a b*tch to configure behind NAT. :wink: )

I’m using a VPS. If it was behind NAT, how would i be able to SSH in?

All the ports work fine. 21 isn’t closed.

If it’s a NAT type connectivity issue, then i wouldn’t be able to get responses from the server, the server would either time out or refuse the connection. It’s quite obvious it’s receiving reponses.

Yes, it’s running CSF Firewall.

No need to tell me what’s “obvious” here, I’m just trying to help. :stuck_out_tongue: Note that SSH does work nicely behind NAT when port 22 is forwarded, and that’s not an obvious proof for “no NAT”.

As for “CSF Firewall”: which ports are opened in that for your server? For passive mode, you need to either open all ports, or set the port range you have opened as “passive mode port range” in ProFTPD’s config.

https://www.centos.org/modules/newbb/viewtopic.php?topic_id=27748
el problema es que hay que cargar siertos modulos en IPTABLES yo esto lo probe con ftp passive + los permisos en iptables para su funcionamiento

Thank Eric a lot for your effective support.

Minh