FTP - Can log in thorugh ssh but not port 21

I can ftp over ssh just fine. However, leaving ssh on is a huge security risk. I have tried to use normal ftp over port 21. I get the username / password forms but my access is denied when I log in with the correct information. Ftp is enabled in iptables for TCP and UDP on port 21. I am using CENTOS 5.2.

However, leaving ssh on is a huge security risk.

This is the least sane thing I’ve seen anyone say all day. FTP is the security risk…SSH is wonderful like unicorns and rainbows and race cars and firetrucks. :wink:

I get the username / password forms but my access is denied when I log in with the correct information.

What’s the error specifically, and what shows up in the logs? (Which log it shows up in depends on your OS/version–I think on CentOS it’d be /var/log/secure or /var/log/messages, by default.)

When I use ftp under windows, which generally works fine when I used to use plesk 7.5 reloaded, I now get the following error:

"An error occured opening that folder on the FTP Server. Make sure you have permission to access that folder"

If this helps.

What folder are you trying to open?

We’ll still need to see the log on the server–we need to know what the client is really trying to do, and why the server is refusing to do it, and the error on the client is almost never specific or verbose enough to aid in determining that.

Well, the other thing – and this is a bit of a shot in the dark – but I’ve seen a number of similar FTP issues crop up because of a missing kernel module.

See what happens if you log into your server as root over SSH and type this:

modprobe ip_conntrack_ftp

And then try logging in via FTP again.
-Eric

modprobe ip_conntrack_ftp didn’t do anything.

Thanks though.

Now it appears to be working. modprobe ip_conntrack_ftp might of been the solution.

We’ll wait and see if it breaks. Sometimes it would log in and other times fail completely (same username / pass). Although, I have 2 successful logins now.

Thanks for the help.