Control Web Panel
WebPanel => CentOS 7 Problems => Topic started by: vox 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?
-
Hello,
Has anyone found a solution?
-
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 (https://thecuriouswebsitedesigner.co.uk/how-to-set-up-ftp-over-tls-ssl-with-centos-web-panel) was one of the few changes I made to the out-of-the-box pure-ftpd config. Otherwise what I have is vanilla.
-
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:
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:
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:
nano /etc/pure-ftpd/pure-ftpd.conf
Comment this lines (go down!):
#TLS 1
#TLSCipherSuite HIGH:MEDIUM:+TLSv1:!SSLv2:!SSLv3
#CertFile /etc/pki/tls/private/hostname.pem
Then edit the service:
nano /usr/lib/systemd/system/pure-ftpd-init.service
Comment this line:
#ConditionPathExists=|!/etc/pki/pure-ftpd/pure-ftpd.pem
Change this line:
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:
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:
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!
-
This like could shed light on the problem:
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".