Submitted by dhzian on Thu, 09/07/2017 - 04:37 Pro Licensee
Hello Guys, in my vps ubuntu 16.04 LTS I can't to start ProFTPD server. If I go in Webmin --> Servers --> ProFTPD Server --> Start Server the result is:
Failed to start FTP server :
Starting proftpd (via systemctl): proftpd.serviceJob for proftpd.service failed because the control process exited with error code. See "systemctl status proftpd.service" and "journalctl -xe" for details.
failed!
In the command line if I launch
systemctl status proftpd.service
the result is:
# systemctl status proftpd.service
● proftpd.service - LSB: Starts ProFTPD daemon
Loaded: loaded (/etc/init.d/proftpd; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2017-09-07 08:21:03 UTC; 6min ago
Docs: man:systemd-sysv-generator(8)
Process: 4644 ExecStart=/etc/init.d/proftpd start (code=exited, status=1/FAILURE)
Sep 07 08:21:03 cloud1.wpfast.eu systemd[1]: Starting LSB: Starts ProFTPD daemon...
Sep 07 08:21:03 cloud1.wpfast.eu proftpd[4644]: * Starting ftp server proftpd
Sep 07 08:21:03 cloud1.wpfast.eu proftpd[4644]: 2017-09-07 08:21:03,868 cloud1.wpfast.eu proftpd[4684]: fatal: unknown configuration directive 'TLSEngine' on line 5 of '/etc/proftpd/conf.d/virtualmin.conf'
Sep 07 08:21:03 cloud1.wpfast.eu proftpd[4644]: ...fail!
Sep 07 08:21:03 cloud1.wpfast.eu systemd[1]: proftpd.service: Control process exited, code=exited status=1
Sep 07 08:21:03 cloud1.wpfast.eu systemd[1]: Failed to start LSB: Starts ProFTPD daemon.
Sep 07 08:21:03 cloud1.wpfast.eu systemd[1]: proftpd.service: Unit entered failed state.
Sep 07 08:21:03 cloud1.wpfast.eu systemd[1]: proftpd.service: Failed with result 'exit-code'.
In the /etc/proftpd/conf.d/virtualmin the unknown configuration directive 'TLSEngine' is On
# chroot users into their home by default
DefaultRoot ~
# Enable TLS
TLSEngine on
TLSRequired on
TLSRSACertificateFile /etc/ssl/certs/proftpd.crt
TLSRSACertificateKeyFile /etc/ssl/private/proftpd.key
TLSOptions NoCertRequest
TLSVerifyClient off
TLSLog /var/log/proftpd/tls.log
<IfModule mod_tls_shmcache.c>
TLSSessionCache shm:/file=/var/run/proftpd/sesscache
</IfModule>
# VirtualHost for SFTP (FTP over SSH) port
LoadModule mod_sftp.c
<VirtualHost 0.0.0.0>
SFTPEngine on
SFTPLog /var/log/proftpd/sftp.log
# Configure the server to listen on 2222 (openssh owns 22)
Port 2222
# Configure the RSA and ECDSA host keys, using the same host key
# files that OpenSSH uses.
SFTPHostKey /etc/proftpd/ssh_host_rsa_key
SFTPHostKey /etc/proftpd/ssh_host_ecdsa_key
# Configure the file used for comparing authorized public keys of users.
SFTPAuthorizedUserKeys file:~/.sftp/authorized_keys
# Enable compression
SFTPCompression delayed
# More then FTP max logins, as there are more ways to authenticate
# using SSH2.
MaxLoginAttempts 6
</VirtualHost>
Please could anyone help me to resolve this problem? Best Mike
Files:
Status:
Closed (fixed)
Comments
Submitted by andreychek on Thu, 09/07/2017 - 08:59 Comment #1
Howdy -- thanks for all the logs and config details! That helps a lot.
I'll talk to Joe about why that issue is occurring, but what you could do in the meantime to get FTP up and running is to comment out the TLS related config options.
That is, the 7 lines beginning with the word "TLS" underneath where it says "# Enable TLS" -- try commenting all those out by putting a "#" at the beginning of the line, then restart FTP.
I'm going to check with Joe to see whether those are part of the distros config, or whether Virtualmin is adding those.
But let us know if commenting those out does the trick.
Submitted by dhzian on Thu, 09/07/2017 - 12:09 Pro Licensee Comment #2
Andrey, thank you! You're a SuperHero! Commented the 7 lines and it runs! Thank you again. Best Mike
Submitted by amo-sysadmin on Fri, 09/08/2017 - 04:01 Comment #3
Hi guys,
@andreychek Same here on Debian 9.1 fresh server install today.
Your comment to comment-out the lines in the conf.d/virtualmin.conf file work fine.
Not having PtoFTPd working isn't really an issue for me, as I only ever use SFTP for connecting to servers via FTP clients.
If you'd like me to check anything in my conf files, etc, to help you identify/resolve the issue, please let me know what you'd like and I'll upload it here.
Regards.
Submitted by fricoman on Fri, 09/08/2017 - 08:05 Comment #4
Hi Guys,
Instead of commenting out the TLS lines just add at top of the file
LoadModule mod_tls.c
and enjoy the benefits of SFTP.The full /etc/proftpd/conf.d/virtualmin.conf file on Ubuntu 16.04 TLS will looks like bellow:
DefaultRoot ~
# Enable TLS
LoadModule mod_tls.c
TLSEngine on
TLSRequired on
TLSRSACertificateFile /etc/ssl/certs/proftpd.crt
TLSRSACertificateKeyFile /etc/ssl/private/proftpd.key
TLSOptions NoCertRequest
TLSVerifyClient off
TLSLog /var/log/proftpd/tls.log
<IfModule mod_tls_shmcache.c>
TLSSessionCache shm:/file=/var/run/proftpd/sesscache
</IfModule>
# VirtualHost for SFTP (FTP over SSH) port
LoadModule mod_sftp.c
<VirtualHost 0.0.0.0>
SFTPEngine on
SFTPLog /var/log/proftpd/sftp.log
# Configure the server to listen on 2222 (openssh owns 22)
Port 2222
# Configure the RSA and ECDSA host keys, using the same host key
# files that OpenSSH uses.
SFTPHostKey /etc/proftpd/ssh_host_rsa_key
SFTPHostKey /etc/proftpd/ssh_host_ecdsa_key
# Configure the file used for comparing authorized public keys of users.
SFTPAuthorizedUserKeys file:~/.sftp/authorized_keys
# Enable compression
SFTPCompression delayed
# More then FTP max logins, as there are more ways to authenticate
# using SSH2.
MaxLoginAttempts 6
</VirtualHost>
I hope this will help.
Submitted by amo-sysadmin on Fri, 09/08/2017 - 08:12 Comment #5
@fricoman & @andreychek
Yup, that works too. Looks like that's the missing line from the virtualmin config.
Thanks @fricoman
Submitted by dhzian on Fri, 09/08/2017 - 09:27 Pro Licensee Comment #6
I've added this line
# VirtualHost for SFTP (FTP over SSH) port
LoadModule mod_sftp.c
but unfortunately in my Ubuntu 16.04 the result is
fatal: unknown configuration directive 'TLSEngine' on line 5 of '/etc/proftpd/conf.d/virtualmin.conf'
Best way for my server is commented first 7 line as said above. Thank you for your help. Best Mike
Submitted by andreychek on Fri, 09/08/2017 - 10:10 Comment #7
If you happen to have a moment for additional troubleshooting, does it work to add this line to that file:
LoadModule mod_tls.c
Does that get those TLS-related lines working for you?
Submitted by amo-sysadmin on Fri, 09/08/2017 - 18:57 Comment #8
Hi @andreychek
Yes. Adding that line to the originally installed (unmodified) version of /etc/proftpd/conf.d/virtualmin.conf does resolve the issue, on Debian 9.1
$ service proftpd start ...returns no errors, and the daemon is running.
$ ps -ef | grep proftpd proftpd 12027 1 0 13:09 ? 00:00:00 proftpd: (accepting connections)
Let me know if you need any snippets from the install log.
Submitted by dhzian on Sun, 09/10/2017 - 04:45 Pro Licensee Comment #9
Hi @andreychek,
Adding
LoadModule mod_tls.c
virtualmin returns me this:Failed to apply FTP configuration :
Checking syntax of configuration file
2017-09-10 09:42:45,591 cloud1.wpfast.eu proftpd[7209]: mod_dso/0.5: module 'mod_sftp.c' already loaded
2017-09-10 09:42:45,592 cloud1.wpfast.eu proftpd[7209]: fatal: unknown configuration directive 'TLSEngine' on line 5 of '/etc/proftpd/conf.d/virtualmin.conf'
Thank you Mike
Submitted by dhzian on Sun, 09/10/2017 - 11:10 Pro Licensee Comment #11
@andreychek yes, I've un-commented the 7 lines that I commented out before.
For anyone suffering this misconfiguration, the key part is to load module
tls.c
before includingconf.d
dir, where virtualmin config resides.LoadModule mod_tls.c
Include /etc/proftpd/conf.d
For anyone coming into this thread in the future:
Make sure you have the latest virtualmin-config package and run the following:
# virtualmin config-system --include ProFTPd
This assumes you're running a system installed with the 6.0.x version of the install script. Old systems with ProFTPd problems should not follow this step; the manual step suggested by Miloshio is fine (for some categories of this problem...there's actually two different causes for similar symptoms depending on whether it's a CentOS or Debian/Ubuntu system...the
virtualmin config-system --include ProFTPd
command fixes either problem).Submitted by andreychek on Mon, 09/18/2017 - 09:58 Comment #15
If you're getting a "config-system.pl was not found" message, that indicates that you're not dealing with a new install... we can still help, but you'd want to open a new request, as it's a different problem than what's described above.
Submitted by tariqtabesh on Sat, 11/25/2017 - 03:55 Comment #16
hi guys i'm using Ubuntu 16.04.3 server i have the same error when i run "sudo service proftpd restart"
"Job for proftpd.service failed because the control process exited with error code. See "systemctl status proftpd.service" and "journalctl -xe" for details."
i followed the all comments. but i have a problem ! there is no file in "/etc/proftpd/conf.d" how can i find this file name:
chroot users into their home by defaultDefaultRoot ~
Enable TLSTLSEngine on TLSRequired on TLSRSACertificateFile /etc/ssl/certs/proftpd.crt TLSRSACertificateKeyFile /etc/ssl/private/proftpd.key TLSOptions NoCertRequest TLSVerifyClient off TLSLog /var/log/proftpd/tls.log TLSSessionCache shm:/file=/var/run/proftpd/sesscache
VirtualHost for SFTP (FTP over SSH) portLoadModule mod_sftp.c SFTPEngine on SFTPLog /var/log/proftpd/sftp.log
# Configure the server to listen on 2222 (openssh owns 22) Port 2222
# Configure the RSA and ECDSA host keys, using the same host key # files that OpenSSH uses. SFTPHostKey /etc/proftpd/ssh_host_rsa_key SFTPHostKey /etc/proftpd/ssh_host_ecdsa_key
# Configure the file used for comparing authorized public keys of users. SFTPAuthorizedUserKeys file:~/.sftp/authorized_keys
# Enable compression SFTPCompression delayed
# More then FTP max logins, as there are more ways to authenticate # using SSH2. MaxLoginAttempts 6
Submitted by andreychek on Sat, 11/25/2017 - 19:39 Comment #17
If you look in /var/log/syslog after that error occurs, you should see a ProFTPd error message... what error are you seeing?
The error should include the file that the problem is occurring in.
Submitted by tariqtabesh on Sun, 11/26/2017 - 00:16 Comment #18
This is the error i got in /var/log/syslog I uploaded a jpg file
and this is the error i got in webmin when i'm starting ProFTPD "Failed to start FTP server : Starting proftpd (via systemctl): proftpd.serviceJob for proftpd.service failed because the control process exited with error code. See "systemctl status proftpd.service" and "journalctl -xe" for details. failed! "
Submitted by JamieCameron on Sun, 11/26/2017 - 12:29 Comment #19
What does the line mentioned in the attached error message contain on your system?
Submitted by DominicDesbiens on Fri, 05/24/2019 - 19:15 Comment #20
Hi,
Just to let you know that « virtualmin config-system --include ProFTPd » worked for me. Many thanks (after searched some time for a fix !).
Submitted by IssueBot on Fri, 06/07/2019 - 19:30 Comment #21
Automatically closed - issue fixed for 2 weeks with no activity.
Submitted by ibridonet on Fri, 08/02/2019 - 04:56 Comment #22
I am still having problem!
Solved creating a temp SSL cert:
launch /etc/ssl/certs/proftpd-gencert