I am trying to make pure-ftpd work on a Ubuntu 20.04 server in a multi-server setup. The server was setup according to the 'perfect server' setup. I can not get FTP working with the persistent errormessage "ECONNREFUSED - Connection refused by server" everytime I try to connect using a FTP client. Here's what I have checked sofar: A FTP user has been setup in ISP, attached to the correct server and website. pure-ftpd is set to listen to port 21 in pure-fptd.conf and port 21 is set in ufw. Port 21 can be reached from the computer I am trying to connect to the server (done a portscan). A passive port range has been defined in pure-fptd.conf (35000 35999) and this range is set in ufw. The TLS option is set to 1. Service pure-ftpd is running according to the command # service pure-ftp-mysql status. According to command # netstat -tulpn , pure-ftpd is listening on port 21. Tried various FTP clients wirth identical error message. I can't see what I've missed and yet I can not get coonnections over FTP. What could I be doing wrong ? Any help is much appreciated. Erik
Any errors related to pure-ftpd in /var/log/syslog? Perhaps something like "Sorry, but that file doesn't exist: [/etc/ssl/private/pure-ftpd.pem]"?
Have you checked that there is no firewall or router in front of the server that might block the FTP ports. E.g. some data centers or cloud providers run firewalls in front of the hosted systems.
Thank you Till and I checked that too. The 'server firewall' as it is called by my provider is off. Erik
There are no errors in the output if I run this command. I tried a restart of pure-ftpd and several attempts to connect.
Yes, if I restart pure-ftpd and then do a status check (# service pure-ftpd-mysql status) I get a status saying it is running. Also, # netstat -tulpn reports pure-ftpd is listening.
maybe try to use a commandline FTP client and connect from commandline of your server to localhost. That way, we can narrow down if it#s an issue with the ftp daemon or if there is an issue to allow connections to the server.
Just tried #ftp localhost. Response: "ftp: connect: Connnection refused" It looks like a pure-ftpd issue then.
Have you done any custom config for pure-ftpd? Could you try doing a force update and reconfigure your services, so pure-ftpd is reconfigured? Code: ispconfig_update.sh --force
I made a few changes in the config file: disabled anonymous FTP, added passive portnumbers and (as was suggested in one of the topics where the same error was discussed) added a passive IP). I'm happy to reconfigure but will that override any of the customizations I may have made for other services? Can I force reconfigure pure-ftpd only instead of all services?
Depends on how you made them. if you implemented the correctly by using conf-custom templates, then the changes are update-safe. if not, they will get oevrridden. But you must re-implement them update-safe anyway if you have not done that yet as you won't be able to install ISPConfig updates otherwise. No
I have made some customisations in the vhost of one of the domains on this server. Can I safely reconfigure without having to redo those? And will this overwrite settings of the currently installed services? I.e., will I have to check all services afterwards for proper working?
You should never change the vhost manually, use the Apache directives instead. Yes, you should if you made customizations. You can use conf-custom templates in the future to prevent this but you'll have to keep these up to date.