The error indicates that ProFTPD is configured to use a TLS certificate (/etc/ssl/certs/proftp.crt
) for secure connections, but the file doesn’t exist. This typically happens if the certificate wasn’t generated or is missing from its expected location.
Steps to Resolve the Issue
1. Generate or Obtain a TLS Certificate
If you don’t already have a certificate, you can generate a self-signed certificate or use a trusted CA (Certificate Authority). Here’s how:
Option A: Generate a Self-Signed Certificate
sudo openssl req -new -x509 -days 365 -nodes -out /etc/ssl/certs/proftp.crt -keyout /etc/ssl/private/proftp.key
- Key Options:
/etc/ssl/certs/proftp.crt
: Certificate file.
/etc/ssl/private/proftp.key
: Private key file.
- Fill in the required details when prompted (e.g., country, organization, etc.).
Option B: Use an Existing Trusted Certificate
- If you have a valid certificate (e.g., issued by Let’s Encrypt or another CA), copy it to
/etc/ssl/certs/proftp.crt
.
- Copy the private key to
/etc/ssl/private/proftp.key
.
Ensure the files have the correct permissions:
sudo chmod 600 /etc/ssl/private/proftp.key
sudo chmod 644 /etc/ssl/certs/proftp.crt
2. Update the Configuration File
Verify the virtualmin.conf
or the main ProFTPD configuration file (/etc/proftpd/proftpd.conf
) for the TLS certificate paths. Look for these lines:
TLSRSACertificateFile /etc/ssl/certs/proftp.crt
TLSRSACertificateKeyFile /etc/ssl/private/proftp.key
Ensure the paths match the locations of your certificate and key.
3. Check for Missing Modules
Sometimes, the required TLS module is missing. Ensure it’s enabled in ProFTPD:
sudo nano /etc/proftpd/modules.conf
Uncomment or add the following line:
LoadModule mod_tls.c
4. Restart the ProFTPD Service
After generating or providing the certificate, restart the service:
sudo systemctl restart proftpd
5. Check Service Status
If the service still fails, check the logs for more details:
sudo systemctl status proftpd
sudo journalctl -xe
Additional Notes
- If you do not need TLS, you can disable it by commenting out or removing the
TLSRSACertificateFile
and TLSRSACertificateKeyFile
directives from /etc/proftpd/conf.d/virtualmin.conf
.
- To disable TLS globally, edit
/etc/proftpd/proftpd.conf
and set:
<IfModule mod_tls.c>
TLSEngine off
</IfModule>