I have now built two Virtualmin Pro servers where at some point the FTP stops working. It just times out on the connection. Any suggestions how to fix this issue or why it should happen in the first place? The server is pretty new and features 12GB of DDR3 and a solid-state drive. It is strong but now the FTP on all accounts does not work.
I’ve sometimes seen that the “nf_conntrack_ftp” module needs to be loaded for FTP to work properly.
You can do that by running this command:
After doing that, does that resolve the FTP issues you’re seeing?
I get a fatal error when I try to run that. The module is not found.
I might have a clue now. When I list the virtual FTP accounts the IP’s do not always match. I am wondering as I have restored virtual accounts from other machines if there is something that is getting the FTP virtual settings confused. Why would virtualmin list an IP that is different than the list ProFTPD Server?
Which distribution/version is it that you’re using?
When you receive those timeout errors – does that occur while initially attempting to make an FTP connection? Or do they occur after being logged in, while attempting to browse the filesystem?
CentOS 5.5 64-bit
I won’t even say timeout exactly. It appears to connect and then it never lists folders and files under the home directory. It just keeps acting like it is downloading the list of files, or whatever. But it will go forever until I disconnect the session manually. With my particular FTP client (FireFTP in FireFox) it gives me a warning that I could lose info if I disconnect - which of course I ignore. So it never really times out. It just goes and goes and goes and nothing happens.
I confess to being a newbie when it comes to Linux in general. I really do like Virtualmin a lot and after building a cPanel machine I never used it. I got use to Virtualmin and liked it a lot better but there is a lot more to it than I have had the time to explore. The FTP server appears to be running. It is a bit weird that the FTP virtual server list does not match the real IP’s anymore - or at least in some cases. Even when it does, I still can’t get an FTP session to work. - Scott
Aha… try this command then, I believe it should work on CentOS 5.x:
After running that, see if your FTP connections begin to work as expected.
It did work! You are my hero! Thanks a million.
Are you behind a (local) firewall or router? If so, that would explain having to use an FTP conntrack module, or alternatively open/forward the appropriate ports. FTP uses two connections, a “control connection” to pass commands, and a “data connection” for each transfer. Ports for the later need to be properly handled.