A General (VsFTPD or ProFTPD) problem

10 posts / 0 new
Last post
#1 Mon, 01/24/2011 - 19:13
SuperSpy

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.

Mon, 01/24/2011 - 19:48
andreychek

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

Fri, 09/20/2013 - 00:03 (Reply to #2)
minhhoang

Thank Eric a lot for your effective support.

Minh

Mon, 01/24/2011 - 20:57
SuperSpy

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.

Mon, 01/24/2011 - 23:41
andreychek

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 :-)

-Eric

Tue, 01/25/2011 - 06:39
SuperSpy

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

Not sure how that affects.

Tue, 01/25/2011 - 08:52
Locutus

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. ;) )

Tue, 01/25/2011 - 16:12
SuperSpy

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.

Tue, 01/25/2011 - 17:15
Locutus

No need to tell me what's "obvious" here, I'm just trying to help. :P 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.

Sun, 08/19/2012 - 21:38
pcaceresz

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

Topic locked