I am working on Debian 8 – ran a series of automated system updates and now I am unable to connect to my local server running proFTPD.
I have made no changes to the client attempting to connect to the server.
I was connecting to the server on port 21 with no issues. Since my update when I try to connect in my usual way I get the following error:
ECONNREFUSED - Connection refused by server
From my research the error states my connection is being refused by a firewall or something of the like. However, I am not running any firewall, iptables is set to allow "all" – this is a local server.
I have checked the proFTPD error logs, and there are no errors logged.
I have ran proFTPD config check and status check, both return positive (it is running)
When I try to run
telnet localhost 21
the result is
connection refused
when I run
telnet localhost 22
I get a connection.
When I try to sftp into my server i get an authentication failed (probably because I haven't set up the keys)
I have checked the proFTPD config file and it is listening on port 21.
I have spent the day on this, seems like it would be easy to fix, however I'm having no luck.
Question:
How can I get back to using port 21 and just connect using normal ftp?
Thanks
UPDATE
Further testing
ps -ef | grep proftpd
results show proftpd accepting connections
however
lsof -i : 21
shows nothing listening… so it looks like proftpd isn't actually listening for some reason
when checking port 22 it simply shows ssh
I read that proftpd may be blocked from listening on port 21 if something else is running.
fuser -n tcp 21
shows no other process attached to that port.
service proftpd status
returns "active (running)"
any other thoughts?
Best Answer
SOLVED:
I must have installed something which enabled secure ftp, and this somehow disabled the un-encrypted connection on port 21
In the proFTPD.conf file, at the very end, there was a directive to enable modules in conf.d folder
in the conf.d folder, there is sftpd.conf, asking to run secure ftp on port 2222
before making any changes I run
the result is proFTPD is listening for a connection on port 2222. When I check port 21, nothing is listening for a connection.
I commented out the include line in proFTPD.conf
Then I restart proFTPD and now I can connect normally again. I have no idea why enabling secure ftp would disable normal ftp.
Hope this helps someone else... the amount of time wasted on this problem is unreal.