Recently I have noticed by default Proftpd is enabled with SFTP module and we are not able to access the server over ftp protocol. This is the default case of Proftpd install from centos repository and a server comes with webmin on Centos7. For Disable SFTP in Proftpd Centos7 or newer version centos 8, refer below steps.
I have faced below issues to successfully start and use the proftpd service on recently installed virtualmin server. Its welcome to use the steps I have followed as a trick or tip.
- Firstly try to start the proftpd service from webmin.
- Service got failed to start with below message.
Copy to Clipboard
- Issue below command in ssh shell access for getting details about error.
Copy to Clipboard
- But in our case above command result recommend to use below command to get details about error.
Copy to Clipboard
- So we can see error as
Copy to Clipboard
As far as I know error is because the file “/etc/ssh/ssh_host_rsa_key’ is group readable and its some kind of bug in new Centos7 ssh package.
- Issued below command and tried to start the service again but it got failed again with below error.
Copy to Clipboard
Copy to Clipboard
- I went to opened file /etc/proftpd.conf using vi editor and commended below lines and successfully started proftpd service.
- At this moment if we try to connect to the server over default ftp port 21. We will get the “Could not connect to server error”
Copy to Clipboard
- This is because by default the proftpd port listening is “2222”and only allow “sftp” protocol access.
Copy to Clipboard
- In such cases we have to use below settings in order to connect to the server over filezilla.
Copy to Clipboard
- Now if we would like to disable sftp in the proftpd and allow ftp access, commend out below lines in the configuration file “/etc/proftpd.conf ” and restart proftpd service. It will allow us to connect to the server over ftp port 21.
This concludes the SFTP disable in proftpd ftp service. Leave your thoughts at the comment box.