Pure-ftpd doesn't write its pid file

Discussion in 'ISPConfig 3 Priority Support' started by DrMartinus, Oct 11, 2018.

  1. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Hi,
    I've setup my virtual server now with the help of ISP-Config and am glad to support this software by subscribing to it, which I did just a few moments ago.
    I have the following problem: After installing the update (3.1.13) on my CentOS 7.5 server, I got an error about pure-ftp, and on checking with systemctl (status) I get the following:
    PID-file /var/run/pure-ftpd.pid not readable (yet?) - after start
    pure-ftpd.service never wrote its pid-file. Failing
    Failed to start...​
    What should I do now?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check in the /var/log/messages log file and in the pure ftpd logs if there are any further error messages when restarting pure ftpd.
     
  3. DrMartinus

    DrMartinus Member HowtoForge Supporter

    I find in messages log only these two lines:
    New connection from 127.0.0.1
    Logout​
    Both at the same time (probably milliseconds after the other). And these entries are three days old. From today, when I tried, nothing is sent to the logs.
    The pure-ftp log is empty.
    One more thing: I just realised, that I cannot restart the service. The attempt gives me the following message:
    ...failed because a configured resource limit was exceeded...
    Then it asks me to run the status command, the result of which is given in my first message.
     
    Last edited: Oct 11, 2018
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem with system status command is that it does not contain useful information except of that it failed to start and without other errors, It's not easy to diagnose why it fails. May you please post the exact error about the configured resource.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    And how much RAM does your virtual server has?
     
  6. DrMartinus

    DrMartinus Member HowtoForge Supporter

    I just realised that the error might happen because the server is running vsftpd. Does ISP-Config support this as well?
    As to your questions: There is no more said in the error message. RAM is 4 GB, of which almost 2 GB are free.
    I have the problem that Putty doesn't copy anything to the clipboard, so I have to copy everything manually, which is cumbersome. I checked the method according to the manual, it doesn't work.
     
  7. DrMartinus

    DrMartinus Member HowtoForge Supporter

    I figured out how to copy & paste fro m Putty. Following my thought above, I tried to disable or rather stop vsftpd. The response is:
    Code:
    Error initializing authority: Could not connect: Connection refused (g-io-error-quark, 39)
    I've restarted the server, yet no success...
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The ISPConfig Perfect server tutorial does not discuss installing vsftpd, and internet search engines do not find successfull installs of vsftpd with ISPConfig. So my guess is vsftpd is not supported on ISPConfig.
    You should check these kinds of things before installing them.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    vsftpd is not supported, I wonder which tutorial you used to install ISPConfig as all of them start with an empty system and none of them installs vsftpd.
     
  10. DrMartinus

    DrMartinus Member HowtoForge Supporter

    As far as I remember, I couldn't get a root ftp account without vsftpd. And I needed that in order to get some packages on the server (like ISPConfig). I'm willing to get rid of it, if pure-ftpd does the job as well. But I couldn't figure that out yet, as I cannot stop vsftpd. Well, I try to uninstall it. Maybe then I have better luck. However, then I would need help in getting a root-ftp account... :)

    Ok, I removed vsftpd. After that, I ran
    Code:
     systemctl status pure-ftpd
    ● pure-ftpd.service - Pure-FTPd FTP server
       Loaded: loaded (/usr/lib/systemd/system/pure-ftpd.service; enabled; vendor preset: disabled)
       Active: active (running) since Do 2018-10-11 10:03:19 UTC; 16s ago
      Process: 12126 ExecStart=/usr/sbin/pure-config.pl /etc/pure-ftpd/pure-ftpd.conf --daemonize (code=exited, status=0/SUCCESS)
     Main PID: 12127 (pure-ftpd)
       CGroup: /system.slice/pure-ftpd.service
               └─12127 pure-ftpd (SERVER)
    
    Okt 11 10:03:19 vmanager5268.v.reverse-ip.de systemd[1]: Starting Pure-FTPd FTP server...
    Okt 11 10:03:19 vmanager5268.v.reverse-ip.de systemd[1]: PID file /var/run/pure-ftpd.pid not readable (yet?) after start.
    Okt 11 10:03:19 vmanager5268.v.reverse-ip.de systemd[1]: Started Pure-FTPd FTP server.
    
    This looks better.
    But when I want to connect, I get the following:
    Code:
    command:    AUTH TLS
    answer:    500 This security scheme is not implemented
    command:    AUTH SSL
    answer:    500 This security scheme is not implemented
    Which screw did I forget to tighten? I have SSL enabled for the website and created the certificates. I didn't find any other place in relation to FTP where I could set this.
     
    Last edited: Oct 11, 2018
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    FTP is never used for the root user, that's why pure-ftpd does not allow it. When you want to upload files as root, use sftp instead, which is SSH and uses the ssh daemon. So all you have to do is to switch your file upload client to use sftp or scp, which is supported by all major clients. No changes in server setup are required. And btw, ispconfig is normally not uploaded by ftp, it is downloaded vy wget when you followed the installation guides. or is your server not connected to the internet?

    SSL for FTP is installed in the installation tutorials for ispconfig. Which tutorial did you use to install ISPConfig on your server? The official ISPConfig CentOS guide shows how to enable SSL for pure-ftpd in chapter 14: https://www.howtoforge.com/tutorial...php-pureftpd-postfix-dovecot-and-ispconfig/2/
     
  12. DrMartinus

    DrMartinus Member HowtoForge Supporter

    I'm pretty sure I followed that tutorial. However, now pure-ftpd gives me the following:
    Code:
    Okt 11 10:29:20 myserver systemd[1]: Starting Pure-FTPd FTP server...
    Okt 11 10:29:20 myserver systemd[1]: PID file /var/run/pure-ftpd.pid not readable (yet?) after start.
    Okt 11 10:29:20 myserver pure-ftpd[15150]: ([email protected]?) [DEBUG] Couldn't load the DH parameters file /etc/ssl/private/pure-ftpd-dhparams.pem
    Okt 11 10:29:20 myserver systemd[1]: Started Pure-FTPd FTP server.
    Okt 11 10:29:30 myserver systemd[1]: Stopping Pure-FTPd FTP server...
    Okt 11 10:29:30 myserver systemd[1]: Stopped Pure-FTPd FTP server.
    
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Please create that missing file with command:

    openssl dhparam -out /etc/ssl/private/pure-ftpd-dhparams.pem 2048

    and then restart pure ftpd.
     
  14. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Thank you! Problem solved!
     
  15. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Thank you! Problem solved!
     
  16. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Hm, I rejoiced too early. After the restart of the server, I could connect via FTP, but only without TLS. Filezilla reports that it's an unsecure server that doesn't support FTP over TLS.

    Ok, I found it. For some reason, the TLS line in the config file was again commented out.
     
    Last edited: Oct 14, 2018

Share This Page