Issue with proftpd

Discussion in 'Installation/Configuration' started by djmostek, Nov 6, 2013.

  1. djmostek

    djmostek New Member

    Few days ago my mysql broke down suddenly without any clear-to-determine reason (the sites content showed "Unable to connect to mysql database"). I managed finally (with few problems but still) to reinstall mysql and as far as database is concerned everything works fine. But since then, occured the problem with ftp. Service is working properly but my useres cannot login - they receive 530 error even though they type appropriate data (checked). Can you give me some tips, maybe how to simply start to deal with this issue?

    I must admit that before mentioned mysql crash everything was working properly.

    2 things to add:

    1. My apache is restarting aright but I get small warn:

    Code:
     NameVirtualHost *:443 has no VirtualHosts
     NameVirtualHost *:80 has no VirtualHosts
    
    2. When i am restarting my proftpd the system shows me as follows:
    Code:
    [email protected]:~# /etc/init.d/pure-ftpd-mysql restart
    
    Restarting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql
    :/etc/pure-ftpd/db/mysql.conf -l pam -Y 1 -u 1000 -E -8 UTF-8 -O clf:/var/log/pu
    re-ftpd/transfer.log -B
    
    The service restarts good but I suppose that it is not the way the ordinary restart notice should look like?
     
    Last edited: Nov 6, 2013
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Just a question, do you mean proftpd or pure-ftpd. ISPConfig 3 uses pure-ftpd, proftpd is not supported, so I guess you use pure-ftpd then?
     
  3. djmostek

    djmostek New Member


    Pure-ftpd of course ;-) insomnia kills...
     
  4. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Both restart messages are absolutely okay imho.

    Have you something in the syslog regarding ftp connections?
     
  5. djmostek

    djmostek New Member

    As far as syslong in a part with ftp connections is concerned it looks like this:

    Code:
    Nov  9 06:30:01 a33 pure-ftpd: ([email protected]) [INFO] New connection from localhost.localdomain
    Nov  9 06:30:01 a33 pure-ftpd: ([email protected]) [INFO] Logout.
    
    .
    .
    
    Nov  9 15:45:01 a33 pure-ftpd: ([email protected]) [INFO] New connection from localhost.localdomain
    Nov  9 15:45:01 a33 pure-ftpd: ([email protected]) [INFO] Logout.
    
    The message was repeated for many times (from hour 6:30 to 15:45 in every 5 minute time) with the same message as showed above.

    Any ideas?
     
  6. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    These messages come from the ISPConfig monitor to test if the ftp is up and running.
    If you have no other messages in there, are you sure you even can connect to the server with ftp?

    Does "lsof -i" show the ftp service listening on (one or every) external ip?
     
  7. djmostek

    djmostek New Member

    Yes
    Code:
    pure-ftpd 10379     root    4u  IPv4  9973488      0t0  TCP *:ftp (LISTEN)
    pure-ftpd 10379     root    5u  IPv6  9973489      0t0  TCP *:ftp (LISTEN)
    
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats ok. Do you have no other messages in the ftp log then the ones of the ispconfig monitor? If there are no other messages, then ftp is most likely blocked by a firewall.
     
  9. djmostek

    djmostek New Member

    The catalogue
    Code:
    /var/log/pure-ftpd
    have only 1 file, namely
    Code:
    transfer.log
    which is empty.

    Do you mean the firewall by server-side or by user-side (which is in my opinion not possible for over 10 different users)?
     
    Last edited: Nov 11, 2013
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    You posted the log entry in #5 of this thread yourself,so you must know in which log they are.
     
  11. djmostek

    djmostek New Member

    There are no additional ftp log infos there.
     
  12. djmostek

    djmostek New Member

    No more ideas? firewall is off..

    The result of 'iptables -L':
    Code:
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    fail2ban-dovecot-pop3imap  tcp  --  anywhere             anywhere             m
    ltiport dports pop3,pop3s,imap2,imaps
    fail2ban-pureftpd  tcp  --  anywhere             anywhere             multiport
    dports ftp
    fail2ban-ssh  tcp  --  anywhere             anywhere             multiport dpor
    s ssh
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain fail2ban-dovecot-pop3imap (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere
    
    Chain fail2ban-pureftpd (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere
    
    Chain fail2ban-ssh (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere
    
    I dropped the entry by
    Code:
     iptables -D fail2ban-pureftpd -s 0.0.0.0/0 -j RETURN
    but did not help
     
    Last edited: Nov 16, 2013
  13. tanius

    tanius New Member

    Use SQL query logging.

    I propose you enable MySQL query logging temporarily to see if the connection between pure-ftpd-mysql and your MySQL server gets established at all and if any queries get across. If not, it may be something about your new MySQL server using a different port or socket than what you configured in /etc/pure-ftpd/db/mysql.conf for pure-ftpd to use.

    See my article "How to fix '530 Login authentication failed' for ISPConfig FTP logins?" on how to use MySQL query logging in this scenario.

    For other people with the issue: I have collected and documented some of the other possible solutions to the "530 Login authentication failed" problem in ISPConfig there as well. Good luck, everyone.
     
  14. djmostek

    djmostek New Member

    It seems to be very useful! Hope it will help sb as I was made to reinstall my server eventually...
     
  15. julykuy

    julykuy New Member

    These messages come from the ISPConfig monitor to test if the ftp is up and running.
     

Share This Page