Author Topic: Pure-FTP fails to run  (Read 2163 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Pure-FTP fails to run
« on: July 18, 2022, 01:18:09 AM »
I upgraded to centos 7 and had to reinstall CWP on the server. There seems to an issue with pure-ftp not running. I get the following error in CWP:

Job for pure-ftpd.service failed because a timeout was exceeded. See "systemctl status pure-ftpd.service" and "journalctl -xe" for details.

Jul 18 01:12:10 fez systemd[1]: pure-ftpd.service start operation timed out. Terminating.
Jul 18 01:12:10 fez systemd[1]: Failed to start Pure-FTPd FTP server.
-- Subject: Unit pure-ftpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit pure-ftpd.service has failed.
--
-- The result is failed.
Jul 18 01:12:10 fez systemd[1]: Unit pure-ftpd.service entered failed state.
Jul 18 01:12:10 fez systemd[1]: pure-ftpd.service failed.

------------------------------

Jul 18 01:15:54 fez systemd: Starting Pure-FTPd FTP server...
Jul 18 01:15:54 fez systemd: Can't open PID file /var/run/pure-ftpd.pid (yet?) after start: Too many levels of symbolic links
Jul 18 01:17:24 fez systemd: pure-ftpd.service start operation timed out. Terminating.
Jul 18 01:17:24 fez systemd: Failed to start Pure-FTPd FTP server.
Jul 18 01:17:24 fez systemd: Unit pure-ftpd.service entered failed state.
Jul 18 01:17:24 fez systemd: pure-ftpd.service failed.



Is there a fix?

Offline
*
Re: Pure-FTP fails to run
« Reply #1 on: January 16, 2023, 12:19:15 PM »
Hello,
Has anyone found a solution?

Offline
*****
Re: Pure-FTP fails to run
« Reply #2 on: January 21, 2023, 09:43:38 PM »
I'm sorry but pure-ftpd is running fine on my 3x CWP servers. Did you change a default? Your error pertains to too many levels of symbolic links, so that could be a clue as to its cause. You may want to remove pure-ftpd and reinstall it. Do you have it set for a default configuration or have you edited the conf file?

If I recall, implementing TLS was one of the few changes I made to the out-of-the-box pure-ftpd config. Otherwise what I have is vanilla.

Offline
*
Re: Pure-FTP fails to run
« Reply #3 on: January 12, 2025, 05:11:31 PM »
Hello,
Has anyone found a solution?

What many don't say is that they try something and it doesn't work. They don't know what they did and then only say on the forum where they got stuck. A little focus never hurt anyone!

However, when we encounter:

Code: [Select]
systemd[1]: pure-ftpd.service: Can't open PID file /var/run/pure-ftpd.pid (yet?) after start: No such file or directory
Or by:

Code: [Select]
pure-ftpd[403394]: (?@?) [DEBUG] Couldn't load the DH parameters file /etc/ssl/private/pure-ftpd-dhparams.pem
Here's how I solved the problem:

Edit the conf:

Code: [Select]
nano /etc/pure-ftpd/pure-ftpd.conf
Comment this lines (go down!):

Code: [Select]
#TLS 1
#TLSCipherSuite HIGH:MEDIUM:+TLSv1:!SSLv2:!SSLv3
#CertFile /etc/pki/tls/private/hostname.pem

Then edit the service:

Code: [Select]
nano /usr/lib/systemd/system/pure-ftpd-init.service
Comment this line:

Code: [Select]
#ConditionPathExists=|!/etc/pki/pure-ftpd/pure-ftpd.pem
Change this line:

Code: [Select]
ExecStart=/usr/bin/sscg --ca-file /etc/pki/pure-ftpd/ca.crt --cert-file /etc/pki/pure-ftpd/pure-ftpd.pem --cert-key-file /etc/pki/pure-ftpd/pure-ftpd.pem
With this one:

Code: [Select]
ExecStart=/bin/sh -c 'cat /etc/pki/tls/certs/hostname.cert /etc/pki/tls/private/hostname.key > /etc/pki/pure-ftpd/pure-ftpd.pem'
Save it and then:

Code: [Select]
systemctl daemon-reload
systemctl start pure-ftpd-init.service
systemctl status pure-ftpd-init.service
systemctl restart pure-ftpd.service
systemctl status pure-ftpd.service

Then reboot!

What was it about? An incompatibility between pure-FTPd and CWP related to certificate and key management.

The root of the problem with pure-ftpd.pid also applies to Nginx! But that's in another thread!

Don't despair, I'm here to be the friendliest helper in our community!

Offline
***
Re: Pure-FTP fails to run
« Reply #4 on: January 14, 2025, 01:32:32 PM »
This like could shed light on the problem:

Code: [Select]
Jul 18 01:15:54 fez systemd: Can't open PID file /var/run/pure-ftpd.pid (yet?) after start: Too many levels of symbolic links
Check paths, symlinks, etc. There could be something like "loop".