Ftp problem logging in.

Discussion in 'Installation/Configuration' started by fathertime, Jan 22, 2012.

  1. fathertime

    fathertime New Member

    I followed the ISPconfig3 setup for lenny with bind and dovecot. I am unable to login via ftp. I am on a 1&1 server, a virtual server. Should I change from the virtual server and goto a dedicated machine? I have tried to get the ftp to work, but no luck. I have email, phpmyadmin, and everything else working. Any ideas or suggestions?:cool:
     
  2. Djamu

    Djamu New Member

    Well you didn't give any actual info aside from "it doesn't work"...

    OS = ?
    FTP server = ?
    did you configure an ftp user in ispconfig ?
    is the ftp server running ? ( check in top )
    is your firewall configured ?
    is your ftp server using passive / active connections ?

    check your logs ( ssh / scp / winscp ) to your machine.

    can you contact the ftp using the given IP address ( it doesn't need a domain ) ?
     
  3. fathertime

    fathertime New Member

    Pure FTP server... problems.

    OS = Linux- Apache2 - Debian 5 Lenny minimal with Dovecot and bind
    (Perfect Server Setup)


    FTP server = NOT RUNNING
    did you configure an ftp user in ispconfig - Yes
    is the ftp server running ? ( check in top ) Not Running on VPS
    is your firewall configured Yes
    is your ftp server using passive / active connections ? Passive

    check your logs ( ssh / scp / winscp ) to your machine. - Logs not written. *server not running

    can you contact the ftp using the given IP address ( it doesn't need a domain ) I have the right IP and domain both.

    Thanks in advance. I have resetup the server several times. It is an issue with running the ftp server. I just don't know where to try next.
     
  4. fathertime

    fathertime New Member

  5. till

    till Super Moderator Staff Member ISPConfig Developer

  6. fathertime

    fathertime New Member

    ftp issue

    Thanks Till.

    I tried that setup but it didn't work. The only way I was able to do this was using the proftp setup.

    I really wish that I could have set it up with pure-ftp. There was always a winsock error, which was because the ftp server wouldn't run.

    I will have to edit this file in the future to update any changes that an ispconfig update would do to it. /usr/local/ispconfig/interface/web/sites/ftp_user_edit.php

    or is it a total break?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    pure-ftpd should on every server. Maybe you did not uninstall the original pure-ftpd package first.

    Thats not easy to predict as it depends on the code and database layout changes done in ispconfig in the future. For the next releases it might work, but its likely that it breaks over the long time.
     
  8. fathertime

    fathertime New Member

    Thanks Till.

    Thanks Till. I did not uninstall the original pure-ftpd package first.

    I will try that first.

    :rolleyes:
     
  9. fathertime

    fathertime New Member

    Pure-ftpd didn't work without capabilities either.

    Well, I tried to get it to work with pure-ftpd, but to no avail.

    I went through the perfect server setup, installing the incorrect setup and then once the server setup was complete I ran :

    Code:
    apt-get remove pure-ftpd-common pure-ftpd-mysql
    I then proceeded to install the pure-ftpd without capabilities setup and I still receive the connection problem, because the ftp server isn't running according to ispconfig.

    Any ideas? or should I revert back to the Proftp setup? Your suggestions are appreciated.

    Thank you,
    FatherTime
     
  10. falko

    falko Super Moderator Howtoforge Staff

    What are the outputs of
    Code:
    netstat -tap
    and
    Code:
    iptables -L
    ?
     
  11. fathertime

    fathertime New Member

    ftp issue

    Code:
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 localhost.localdoma:953 *:*                     LISTEN      32264/named
    tcp        0      0 *:smtp                  *:*                     LISTEN      30346/master
    tcp        0      0 *:https                 *:*                     LISTEN      1594/apache2
    tcp        0      0 *:imaps                 *:*                     LISTEN      5924/imap-login
    tcp        0      0 *:pop3s                 *:*                     LISTEN      5330/pop3-login
    tcp        0      0 localhost.localdo:10024 *:*                     LISTEN      30412/amavisd (mast
    tcp        0      0 localhost.localdo:10025 *:*                     LISTEN      30346/master
    tcp        0      0 *:mysql                 *:*                     LISTEN      30184/mysqld
    tcp        0      0 *:pop3                  *:*                     LISTEN      5330/pop3-login
    tcp        0      0 *:imap2                 *:*                     LISTEN      5924/imap-login
    tcp        0      0 *:http-alt              *:*                     LISTEN      1594/apache2
    tcp        0      0 *:www                   *:*                     LISTEN      1594/apache2
    tcp        0      0 *:tproxy                *:*                     LISTEN      1594/apache2
    tcp        0      0 s2.online:domain *:*                     LISTEN      32264/named
    tcp        0      0 localhost.locald:domain *:*                     LISTEN      32264/named
    tcp        0      0 *:ssh                   *:*                     LISTEN      1633/sshd
    tcp        0      0 localhost.localdo:mysql localhost.localdo:52740 ESTABLISHED 30184/mysqld
    tcp        0      0 localhost.localdo:52740 localhost.localdo:mysql ESTABLISHED 31920/amavisd (ch1-
    tcp       68      0 localhost.localdo:44736 localhost.localdo:10025 CLOSE_WAIT  31920/amavisd (ch1-
    tcp        0    248 s2.onlinehom:ssh 97-90-65-58.stati:59453 ESTABLISHED 7208/0
    tcp        0      0 s2.onlinehom:www dynamicip-176-214-:4543 TIME_WAIT   -
    tcp6       0      0 ::1%225208816:953       [::]:*                  LISTEN      32264/named
    tcp6       0      0 [::]:domain             [::]:*                  LISTEN      32264/named
    tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      1633/sshd
    
    and ...
    Code:
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    FATAL: Could not load /lib/modules/2.6.18-028stab094.3/modules.dep: No such file or directory
    FATAL: Could not load /lib/modules/2.6.18-028stab094.3/modules.dep: No such file or directory
    fail2ban-ssh  tcp  --  anywhere             anywhere            multiport dports ssh
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain fail2ban-ssh (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere
    
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

  13. fathertime

    fathertime New Member

    results

    I have checked they syslog file and there were no entries for pure-ftpd. I also checked /var/log/pure-ftp and there is no log file or any file in that folder.

    Ispconfig shows that the ftp server is not running.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Which error message do you get when you restart pure-ftpd on the shell as root user?
     
  15. fathertime

    fathertime New Member

    ftp issue

    no response. It just went back to the cursor.
     
  16. Djamu

    Djamu New Member

    It looks like there's a rotten config / bin out there that doesn't get overwritten
    if you remove packages it's preferred to use
    Code:
    apt-get purge "mypackage" "other-package"
    instead of apt-get remove

    I'll first give a rundown of the symptoms and then a list of commands you should do

    The difference is that purge also removes any related config file ( a remove only removes the runtime bins not the config )

    It is possible that for some reason ( and despite being hashchecked ) a downloaded packet got corrupted > google for "bucket collision" for more info on this, in short it is possible ( and rare ) that 2 different pieces of data generate exact the same hash, this being the very reason why md5 is not used anymore for security.

    after the purge and before a package reinstall clear everything in the
    /var/cache/apt/archives folder ( except for the partial folder + a possible lock file ) , make sure the partial folder is empty too

    another thing to check is that the HD('s) are ok ... you should install smartmontools and check the HD health

    so:
    make sure you have installed the pure-ftpd-common pure-ftpd-mysql packages
    then:
    Code:
    apt-get purge pure-ftpd-common pure-ftpd-mysql
    cd /var/cache/apt/archives
    rm *
    cd partial
    rm *
    cd /
    apt-get install smartmontools
    check the hd's you have and list them

    Code:
    fdisk -l 
    for each HD run ( don't use the partition nrs so don't use something like > smartctl --all /dev/sda1 )
    Code:
    smartctl --all /dev/sda
    smartctl --all /dev/sdb
    ...
    put the result of that here

    if that all looks ok.
    you can also run the short test ( takes a couple of minutes )

    > smartctl -t /dev/sda

    reinstall those packages
    Code:
    apt-get install pure-ftpd-common pure-ftpd-mysql
    and take it back from there... > all suggestions from Till

    if it still doesn't work, another corrupt package ( as dependency ) may have caused this..
    ( It happened to me before ... and more then once ) ..
    In that case, just wipe the HD's ( especially partition table if you're too impatient ), repartition / reformat / re-install
    and if you installed the machine from CD, re-download the ISO from another mirror > same bucket collision thing may apply to ISO's that pass the md5 test ( again very rare, but you never know ).
    Also pick another apt repository mirror
    If you think this is too far fetched ... think again, a couple of friends recently uncovered an array of similar issues with well known server packages ( as attack vector ) that will be patched shortly ...

    Jan
     
    Last edited: Jan 26, 2012

Share This Page