Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

SOLVED FTP connects but Failed to retrieve directory listing

Discussion in 'General Discussion' started by Jerald Feller, Sep 18, 2017.

  1. Jerald Feller

    Jerald Feller Member

    Joined:
    Feb 14, 2017
    Messages:
    13
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Philippines
    cPanel Access Level:
    Root Administrator
    Hi, why I cant connect to FTP or it gives me error: Failed to retrieve directy listing?
    I'm new to the server stuff and besides I didnt do any anything to the FTP configuration or settings. I create ftp accounts trough cpanel.

    This is the logs when I access ftp.

    Status: Connecting to 104.*******...
    Status: Connection established, waiting for welcome message...
    Status: Initializing TLS...
    Status: Verifying certificate...
    Status: TLS connection established.
    Status: Logged in
    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,167,229,23,178,72)
    Command: MLSD
    Error: Connection timed out after 20 seconds of inactivity
    Error: Failed to retrieve directory listing


    Please advise, Thanks
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. Jerald Feller

    Jerald Feller Member

    Joined:
    Feb 14, 2017
    Messages:
    13
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Philippines
    cPanel Access Level:
    Root Administrator
    Thank you for your response.

    Yes I did look on that but I didnt change anything on the cofiguration file since that passive mode is enabled already or I'm getting it wrong.

    Here is the cofiguration for /etc/pur-ftpd.conf
    # Port range for passive connections replies. - for firewalling.
    PassivePortRange 30000 50000

    and there is no CSF in my server so I guess its on IPTABLES
    -A INPUT -p tcp -m tcp --dport 30000:50000 -j ACCEPT
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look?

    Thank you.
     
  5. Jerald Feller

    Jerald Feller Member

    Joined:
    Feb 14, 2017
    Messages:
    13
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Philippines
    cPanel Access Level:
    Root Administrator

    Hi,

    Thank you for the response.
    I just figured it out and fixed the issue.

    This is no solve.

    Its weird though in the pure-ftpd.conf
    ForcePassiveMode public-ip-address is somehow changed and I dont know why.. havent touch that file ever since..

    But btw its solve..
    Thank you very much
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  7. Michael Legg

    Michael Legg Member

    Joined:
    Mar 2, 2015
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    New Farm, Queensland, Australi
    cPanel Access Level:
    Website Owner
    I'm having the same issue. I can connect via FTP but can't get a directory listing.
    I've tried everything mentioned in these forums including disabling CSF, but I still can't get FTP to work (Passive or active)
    Running cPanel 66.0.25 release
     
  8. Jerald Feller

    Jerald Feller Member

    Joined:
    Feb 14, 2017
    Messages:
    13
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Philippines
    cPanel Access Level:
    Root Administrator

    Hi, try open your pure-ftpd.conf and disable ForcePassiveMode just comment it and try loggin in again in FTP.

    This solved my issue.
     
  9. cPWilliamL

    cPWilliamL cP Technical Analyst II
    Staff Member

    Joined:
    May 15, 2017
    Messages:
    78
    Likes Received:
    7
    Trophy Points:
    83
    Location:
    America
    cPanel Access Level:
    Root Administrator
  10. Michael Legg

    Michael Legg Member

    Joined:
    Mar 2, 2015
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    New Farm, Queensland, Australi
    cPanel Access Level:
    Website Owner
    Thanks Jerard

    I have ...

    1. Disabled passive mode completely.

    2. Run these commands ->
    openssl dhparam -out /etc/ssl/private/pure-ftpd-dhparams.pem 2048
    /scripts/restartsrv_pureftpd

    3. Enabled Broken Clients Compatibility.

    I can now connect via FTP - at least in Active mode.
     
Loading...

Share This Page