proftpd not running and unable to start


I installed virtualmin yesterday and everything seems to work fine except FTP.

I cannot start proftpd whenever I click “start” the following error is thrown:

Failed to start FTP server :

Job for proftpd.service failed because the control process exited with error code. See "systemctl status proftpd.service" and "journalctl -xe" for details.

The journalctl -xe shows some usefull info:

proftpd: fatal: SFTPHostKey: Unable to use '/etc/ssh/ssh_host_rsa_key' as host key, as it is group- or world-accessible on line 436 of '/etc/proftpd.conf'

I tried finding a solution using google but I cannot find anything related to proftpd and virtualmin. I am not too experienced in Linux aswel (still learning) so I do not feel comfortable editing things without knowing what it does.

I would appreciate any help regarding this issue


If you look in the ProFTPd config file, do you see some sort of option regarding the SFTPHostKey?

If so, does commenting that out allow ProFTPd to start?


Try this:

chmod og= /etc/ssh/ssh_host_rsa_key ` `

Also, please see my recent posting

To resolve this,
Comment the lines

SFTPEngine on
Port 2222
SFTPLog /var/log/proftpd/sftp.log

“# SFTPHostKey /etc/ssh/ssh_host_rsa_key”
“# SFTPHostKey /etc/ssh/ssh_host_dsa_key”

LIne number 435 and 436
restart proftpd

Nice work, thank you very much…

Thanks… Also… Just had this on a new install Redhat7 on AWS …

You can generate new host keys just for sftp:
ssh-keygen -f /etc/ssh/sftp_host_rsa_key -N ‘’ -t rsa
ssh-keygen -f /etc/ssh/sftp_host_dsa_key -N ‘’ -t dsa

Make sure only root can read or write them and change your proftpd.conf to pick the new files
SFTPHostKey /etc/ssh/sftp_host_rsa_key
SFTPHostKey /etc/ssh/sftp_host_dsa_key

sshd is running on another port anyhow, in my opinion it will not generate the confusion stated in the docs.