Ftp server goes down after logging in

Discussion in 'Installation/Configuration' started by Nolan, Dec 10, 2010.

  1. Nolan

    Nolan Member

    Hi, I used the bind and dovecot installation method.

    I'm on Debian lenny

    I'm on a machine running OpenVZ, and I followed the manual on this section on how to set up PureFTPd.

    I went to create an ftp user, all seemed fine, but when I went to log into it using Filezilla, it won't let me log in with the data that I set up.

    I went to check the services status, and the FTP server is down now.
     
  2. Nolan

    Nolan Member

    It says
    Dec 10 15:35:20 ct18376 pure-ftpd: (?@?) [ERROR] Unable to start a standalone server: [Invalid argument]

    Edit: I didn't think about this until now, but in the perfect server setup here: http://www.howtoforge.com/perfect-s...bian-5.0-with-bind-and-dovecot-ispconfig-3-p4 under step 12 it refers to restarting the inetd and says:
    Restart inetd afterwards:

    Code:
    /etc/init.d/openbsd-inetd restart
    My server says:
    Code:
    -bash: /etc/init.d/openbsd-inetd: No such file or directory
    , when I try to do that command. Perhaps that has something to do with it?

    Edit #2: My server has xinetd in /etc/init.d and I restarted that.
    Let me try restarting pure-ftpd
     
    Last edited: Dec 11, 2010
  3. Nolan

    Nolan Member

    I ran /etc/init.d/pure-ftpd-mysql restart .

    The service restarted, and I was able to log in, but the connection timed out before letting me access anything... Here is the log file of my FTP Client:

    Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
    Response: 220-You are user number 1 of 50 allowed.
    Response: 220-Local time is now 20:48. Server port: 21.
    Response: 220-This is a private system - No anonymous login
    Response: 220-IPv6 connections are also welcome on this server.
    Response: 220 You will be disconnected after 15 minutes of inactivity.
    Command: USER nolan1
    Response: 331 User nolan1 OK. Password required
    Command: PASS *******
    Response: 230-User nolan1 has group access to: client1 sshusers
    Response: 230 OK. Current restricted directory is /
    Command: SYST
    Response: 215 UNIX Type: L8
    Command: FEAT
    Response: 211-Extensions supported:
    Response: EPRT
    Response: IDLE
    Response: MDTM
    Response: SIZE
    Response: REST STREAM
    Response: MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
    Response: MLSD
    Response: ESTP
    Response: PASV
    Response: EPSV
    Response: SPSV
    Response: ESTA
    Response: AUTH TLS
    Response: PBSZ
    Response: PROT
    Response: 211 End.
    Status: Connected
    Status: Retrieving directory listing...
    Command: PWD
    Response: 257 "/" is your current location
    Command: TYPE I
    Response: 200 TYPE is now 8-bit binary
    Command: PASV
    Response: 227 Entering Passive Mode (208,53,183,76,72,106)
    Command: MLSD
    Error: Connection timed out
    Error: Failed to retrieve directory listing

    Refer to my post about cron: http://www.howtoforge.com/forums/showpost.php?p=246347&postcount=2

    I dont know if it affects this or not... it seems to have created the user, and it let me log in, it just won't show me directories.
    However, the ftp server doesn't shut down when I try to log in anymore :D

    After I logged in, I checked the ISPconfig system log and here's what it told me (My IP represents xx.xxx.xxx.xx):

    Code:
    Dec 10 22:19:33 ct18376 pure-ftpd: ([email protected]) [INFO] New connection from xx.xxx.xxx.xx
    Dec 10 22:19:33 ct18376 pure-ftpd: ([email protected]) [INFO] nolan1 is now logged in
    Dec 10 22:20:01 ct18376 pure-ftpd: ([email protected]) [INFO] New connection from 127.0.0.1
    Dec 10 22:20:01 ct18376 pure-ftpd: ([email protected]) [INFO] Logout.
    EDIT1: pure-ftpd seems to be logging into itself? All I know is I didn't do anything, But there's multiple entries of that in my ISPConfig System messages log. (see below)
    Code:
    Dec 11 16:00:01 ct18376 pure-ftpd: ([email protected]) [INFO] New connection from 127.0.0.1
    Dec 11 16:00:01 ct18376 pure-ftpd: ([email protected]) [INFO] Logout.
    Dec 11 16:05:01 ct18376 pure-ftpd: ([email protected]) [INFO] New connection from 127.0.0.1
    Dec 11 16:05:01 ct18376 pure-ftpd: ([email protected]) [INFO] Logout.
    Dec 11 16:10:01 ct18376 pure-ftpd: ([email protected]) [INFO] New connection from 127.0.0.1
    Dec 11 16:10:01 ct18376 pure-ftpd: ([email protected]) [INFO] Logout.
    Dec 11 16:15:01 ct18376 pure-ftpd: ([email protected]) [INFO] New connection from 127.0.0.1
    Dec 11 16:15:01 ct18376 pure-ftpd: ([email protected]) [INFO] Logout.
    Dec 11 16:20:01 ct18376 pure-ftpd: ([email protected]) [INFO] New connection from 127.0.0.1
    Dec 11 16:20:01 ct18376 pure-ftpd: ([email protected]) [INFO] Logout.
    Dec 11 16:25:01 ct18376 pure-ftpd: ([email protected]) [INFO] New connection from 127.0.0.1
    Dec 11 16:25:02 ct18376 pure-ftpd: ([email protected]) [INFO] Logout.
    Sorry for all of the multiple posts I've been doing in my threads... It's just when I go to get information on something, something else seems to happen (either good or bad)

    Thanks,

    Nolan
     
    Last edited: Dec 11, 2010
  4. Nolan

    Nolan Member

    Anyone have any ideas on how to solve this?
     
  5. falko

    falko Super Moderator ISPConfig Developer

    This is ISPConfig's Moitoring module which tries to check if FTP is still running.
     
  6. Nolan

    Nolan Member

    Oh Okay.

    Why doesn't list the directories when I try to log in with the FTP account? :confused:
    As you can see by the FileZilla log, It tried logging in via active and passive mode.
    It's also not letting me log in using SSH either :/

    Thanks
     
    Last edited: Dec 13, 2010
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess a firewall blocks the ftp passive ports, thats why your server can not list the directories. The log you posted is typical for that:

    Response: 227 Entering Passive Mode (208,53,183,76,72,106)
    Command: MLSD
    Error: Connection timed out

    make sure that you disabled the firewall on the server and if your server is behind a router, then you might want to forward the passive port range from the router to the server.
     
  8. Nolan

    Nolan Member

    There shouldn't be a firewall on the server except for the one that is with ISPConfig. What ports should I unblock on there for Passive?

    As for the router, I'm pretty sure all ports on my server are open by default, since data centers usually don't close ports. But I will find out if a different fire wall is blocking it.

    Edit: I contacted the data center, and there are no firewalls on the server apart from ISPConfig. The firewall on ISPConfig has TCP ports 20,21,22, and 25 open.
     
    Last edited: Dec 14, 2010
  9. Nolan

    Nolan Member

    I used nmap to scan the ports and it shows that these ports are open on my server:
    (IP represents the IP of my server)

    Code:
    Here is some detailed info:
    PORT      STATE  SERVICE          VERSION
    20/tcp    closed ftp-data
    21/tcp    open   ftp              PureFTPd
    22/tcp    open   ssh              OpenSSH 5.1p1 Debian 5 (protocol 2.0)
    
    Rest of the ports:
    
    Discovered open port 22/tcp on IP
    Discovered open port 8080/tcp on IP
    Discovered open port 110/tcp on IP
    Discovered open port 21/tcp on IP
    Discovered open port 53/tcp on IP
    Discovered open port 25/tcp on IP
    Discovered open port 443/tcp on IP
    Discovered open port 143/tcp on IP
    Discovered open port 3306/tcp on IP
    Discovered open port 80/tcp on IP
    Discovered open port 8443/tcp on IP
    Discovered open port 8081/tcp on IP
    What now?
     
    Last edited: Dec 14, 2010
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Please steop the ispconfig firewall by running:

    /etc/init.d/bastille-firewall stop

    and try again.
     
  11. Nolan

    Nolan Member

    Hey! it worked! :)

    Is there a way though to automatically have the FTP client go to web client folder when they log in? Right now it's going to / and I want it to go to /var/www/clients/client1/web2
    However, I want it to go to each client's folder when they log in, not just the same folder all the time
    is this possible? It might have been something I didn't set correctly...
     
  12. Nolan

    Nolan Member

    SSH Still doesn't work though :/ it lets me log in but then it gives me an error when I go to open the terminal window.

    "Windows Error 10061:No connection could be made because the target machine actively refused it"

    The root account the data center gave me to log in works... but nothing created with ISPConfig does.
     
    Last edited: Dec 14, 2010
  13. falko

    falko Super Moderator ISPConfig Developer

    You can set the start folder in your FTP client.
     
  14. Nolan

    Nolan Member

    Never mind, it was going to the correct folder. it just showed it on filezilla as going to / although it was going to /var/www/client1/web2/

    Any idea why SSH isn't working? :/
     
  15. falko

    falko Super Moderator ISPConfig Developer

    Do you use fail2ban? Maybe you locked yourself out.
     
  16. Nolan

    Nolan Member

    Yep, fail2ban is installed, that's probably what it was..

    How do I remove any bans I might've accidentally placed on myself?
     
  17. falko

    falko Super Moderator ISPConfig Developer

  18. Nolan

    Nolan Member

    My IP's not listed in the list, so it's not being blocked by fail2ban
     
  19. falko

    falko Super Moderator ISPConfig Developer

    Then I have no idea why SSH isn't working for you. :(
     

Share This Page