ProFTPD cannot support both FTPS and SFTP for the same host

P

After upgrading ProFTPD to version 1.3.8 one may see the error:

mod_sftp/1.1.1: Server 'ProFTPd': Cannot support both FTPS (TLSEngine on) and SFTP (SFTPEngine on) for the same host

Here's a guide on how to fix this on a server with DirectAdmin.

Important: The steps below will disable FTP on your server, forcing you to use SFTP with your FTP-credentials. Do not follow the steps if you are not sure you understand all the consequences.

perl -pi -e 's/TLSEngine.*/TLSEngine off/' /etc/proftpd.conf

and restart proftpd:

systemctl restart proftpd

Copy the update file to the “Custombuild” folder to allow the changes to persist in future updates:

mkdir -p /usr/local/directadmin/custombuild/custom/proftpd/conf/
\cp -p /etc/proftpd.conf /usr/local/directadmin/custombuild/custom/proftpd/conf/

That’s it.

Second solution: SFTP with FTP

It is expected that ProFTPd on the server is already compiled with support for sFTP and that a file /etc/proftpd.sftp.conf exists on the server.

If you still need SFTP with FTP on the same server, you can install an updated configuration from the link:

Run the following commands as root to install the updated configuration from Poralix's GitHub repository on the DirectAdmin server:

mkdir -p /usr/local/directadmin/custombuild/custom/proftpd/conf/
cd /usr/local/directadmin/custombuild/custom/proftpd/conf/
wget  -O proftpd.conf

And then reinstall proftpd:

cd /usr/local/directadmin/custombuild/
./build proftpd

have fun!

Add comment

By Ranjan