The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

FTP Not Working - Help Please!

Discussion in 'General Discussion' started by Dodi300, Jul 23, 2009.

  1. Dodi300

    Dodi300 Member

    Joined:
    Jul 1, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hello. Two days ago my FTP was working fine, however I got an email from a client saying that he receives the message:
    "A connection with the server could not be established"

    I tried to log in and I receive that message as well.
    I've tried restarting the FTP server and also changing the config options in WHM.
    Nothing seems to work.

    Does anyone know whats wrong?
    Any log files I can look at to see the problem?

    Thanks for the help. :)
     
  2. logicsupport

    logicsupport Well-Known Member

    Joined:
    Jun 5, 2007
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    Seems that its a firewall issue. Try this again after disabling firewall.

    Also confirm all the ftp modules are loaded properly using the following command.

    lsmod | grep ftp
     
  3. Dodi300

    Dodi300 Member

    Joined:
    Jul 1, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    The firewall is not enabled.
    Also I ran that command, but nothing happened.
    I didn't get an error or anything.

    Are there any log files for the FTP?
    By the way, I'm using Pure-FTPD.

    Thanks!
     
  4. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    You can check the FTP logs from the below mentioned location from SSH.

    pico /var/log/messages
     
  5. logicsupport

    logicsupport Well-Known Member

    Joined:
    Jun 5, 2007
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    16
    If you are not in a vps , then you can enable the ftp module using the following two commands.

    modprobe -r ip_conntrack_ftp

    modprobe ip_conntrack_ftp

    Restart the ftp server

    /scripts/restartsrv_pureftpd

    Ftp log :

    tail -f /var/log/xferlog

    If you are still facing issue you need ask help from any system administrators
     
  6. Dodi300

    Dodi300 Member

    Joined:
    Jul 1, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    From the logs it looks like I can login but then it logs me back out again.
    There's no errors or anything.

    I'll open a ticket.

    Thanks for the help! :)
     
  7. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Are you using "passive mode" in your FTP program when you connect?

    Many firewalls will interpret outgoing FTP connections as incoming hacking attacks if you fail to set your FTP program on your home computer to use "Passive Mode" and will block your connection right after you connect.

    Incidentally, this originates from the firewall on your own computer at home instead of the firewall from the server.

    EDIT: I forgot to mention yesterday that you will need to open your Firewall on your server for "Passive Mode" if you are using CSF or APF (or similar) and will also need to setup your FTP server use it. If you don't do this on the server to allow for passive mode or fail to setup your FTP client at home to use the same then you will likely keep getting disconnected by the firewall that is on your home computer. (Instructions with CSF follow):

    Code:
    # cd /etc/csf
    # pico ./csf.conf      [i](or vi ./csf.conf)[/i]
    
    Add the following in-line to your TCP_IN Line:          [b]30000:35000[/b]
    
    # cd /etc
    # pico ./pure-ftpd.conf
    
    Add the following to your FTP server configuration
    
    [b]PassivePortRange        30000 35000[/b]
    
    # service csf restart
    # service pure-ftpd restart
    
    With your FTP server accepting "PASSIVE MODE" connections and your home FTP client software utilizing "PASSIVE MODE", you should no longer get disconnected by your home computer firewall anymore! ;)
     
    #7 Spiral, Jul 24, 2009
    Last edited: Jul 25, 2009
  8. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    Hi,

    Please post the logs here..also provide the ping and tracert report from the system in which you are facing the issue to connect with server for FTP service.
     
Loading...

Share This Page