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?

  • Try netstat -tulpn|grep 21 to see if there is actually a listener. – Julie Pelletier May 24 '16 at 6:35
  • @JuliePelletier I ran that command, blank response. So I'm guessing it isn't listening. How would I get it back up and running? – user1017063 May 24 '16 at 6:48
  • 1
    If it's blank, it is not listening. Did you check the proftpd logs? – Julie Pelletier May 24 '16 at 6:53
  • @JuliePelletier yes. there are no errors at all. just starting and stopping (when i restart the server) – user1017063 May 24 '16 at 6:56
  • Did you install it through inetd or standalone? – Julie Pelletier May 24 '16 at 7:04
up vote 0 down vote accepted

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

lsof -i :2222

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

include /etc/proftpd/conf.d/

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.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.