1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

FTP Connection Error : Error loading directory...

Discussion in 'General Discussion' started by tuncayeskikoy, May 30, 2011.

Thread Status:
Not open for further replies.
  1. tuncayeskikoy

    tuncayeskikoy New Member

    Joined:
    May 30, 2011
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi

    We can not access the ftp directory on the newly formed cpanel.
    Connection logs, such as the following.
    Look forward to your help.
    Sorry for bad English.

    --------------------------------------------------------------
    220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
    220-You are user number 1 of 50 allowed.
    220-Local time is now 15:04. Server port: 21.
    220-This is a private system - No anonymous login
    220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
    USER xpazarla
    331 User xpazarla OK. Password required
    PASS **********
    230 OK. Current restricted directory is /
    SYST
    215 UNIX Type: L8
    Keep alive off...
    Attemping Active mode transfer...
    PORT 192,168,100,90,68,127
    200 PORT command successful
    LIST
    500 Unknown command
    Server failed to connect data port
    Error loading directory...
    -------------------------------------------------------------
     
  2. adminlogs

    adminlogs New Member

    Joined:
    May 30, 2011
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi ,

    Check port 20 is open in the server firewall.

    you can allow port 20 in iptables

    iptables -A INPUT -s 0/0 -p tcp --dport 20 -j ACCEPT

    /etc/init.d/iptables save


    In the above its allowed from public. If you want then you can restrict with the specified ip's.


    Sincerely,
    /http://www.adminlogs.info
     
  3. cPanelJared

    cPanelJared cPanel Staff
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,835
    Likes Received:
    12
    Trophy Points:
    38
    Location:
    Houston, TX
    FTP normally uses port 21, not 20.

    What is described looks like the customer is using passive-mode FTP and a port range is not open in the firewall to match the port range used by the FTP service. There are two options to fix this:

    • Use active-mode FTP instead of passive. This is normally selectable in the FTP client. In the command-line FTP client, you can simply type "passive" to toggle passive/active mode.
    • Configure a port range for passive-mode FTP in the FTP service configuration, and configure the server's firewall to match.

    The second option has been covered extensively in this forum, as it is a very common issue. I found the following threads that should help:

    http://forums.cpanel.net/f5/ftp-passive-mode-not-working-74605.html
    http://forums.cpanel.net/f5/passive-ftp-cpbackup-not-working-202992.html
    http://forums.cpanel.net/f5/ftp-not-working-help-please-125589.html

    If you are using Pure-FTPd, which is the default, you can define the passive-mode port range by editing /etc/pure-ftpd.conf and uncommenting the following directive:

    Code:
    # Port range for passive connections replies. - for firewalling.
    
    # PassivePortRange          30000 50000
    Once you have removed the hash mark (#) from the line starting with "PassivePortRange", restart Pure-FTPd and edit your firewall configuration to allow traffic on the same port range.
     
  4. tuncayeskikoy

    tuncayeskikoy New Member

    Joined:
    May 30, 2011
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    the firewall is turned off. Log on with ProFTPD
     
  5. cPanelJared

    cPanelJared cPanel Staff
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,835
    Likes Received:
    12
    Trophy Points:
    38
    Location:
    Houston, TX
    There may also be a firewall on your end or your user's end that could cause a problem. Does switching to active mode, as I mentioned, work?
     
  6. tuncayeskikoy

    tuncayeskikoy New Member

    Joined:
    May 30, 2011
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    PassivePortRange 30000 50000

    I enabled the above line. the firewall is turned off. still not connecting.
     
  7. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    Are you certain you are trying passive mode even? The log shows active mode:

    Are you using an FTP client such as FileZilla or what precisely? If you are not using FileZilla, could you try using that free FTP client? You can download it from here:

    FileZilla - Client Download
     
  8. tuncayeskikoy

    tuncayeskikoy New Member

    Joined:
    May 30, 2011
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    FileZilla output:

    Status: Resolving address of ftp......com
    Status: Connecting to ........:21...
    Status: Connection established, waiting for welcome message...
    Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
    Response: 220-You are user number 1 of 50 allowed.
    Response: 220-Local time is now 14:24. Server port: 21.
    Response: 220-This is a private system - No anonymous login
    Response: 220 You will be disconnected after 15 minutes of inactivity.
    Command: USER xpazarla
    Response: 331 User xpazarla OK. Password required
    Command: PASS ********
    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: AUTH TLS
    Response: PBSZ
    Response: PROT
    Response: ESTA
    Response: PASV
    Response: EPSV
    Response: SPSV
    Response: ESTP
    Response: 211 End.
    Status: Connected
    Status: Retrieving directory listing...
    Command: PWD
    Response: 257 "/" is your current location
    Command: TYPE I
    Response: 504-Unknown TYPE: I
    Response: 504 TYPE is now ASCII
    Error: Failed to retrieve directory listing
     
  9. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    12,122
    Likes Received:
    31
    Trophy Points:
    48
    Location:
    Pennsylvania
    Silly question I'm sure, but can you login to this cPanel users account normally?
     
  10. tuncayeskikoy

    tuncayeskikoy New Member

    Joined:
    May 30, 2011
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    yes , I can login to this cPanel users account normally
     
  11. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    12,122
    Likes Received:
    31
    Trophy Points:
    48
    Location:
    Pennsylvania
    Using Filezilla to duplicate your steps, my output is identical until the last section:

    Code:
    
    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 ([I]ip,he,re,some,where[/I])
    Command:	MLSD
    Response:	150 Accepted data connection
    Response:	226-Options: -a -l 
    Response:	226 15 matches total
    Status:	Directory listing successful
    
    
     
  12. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    If you have root SSH access, please run an "ls -lah /home/xpazarla" to check the permissions on the directory.

    Next, what operating system are you using? There's a bug in pure-ftpd where it will not work to list the directories or upload files in RHEL 3 and CentOS 3. For those operating systems where pure-ftpd will not work, proftpd needs to be used.

    Finally, please check for the following in /etc/pure-ftpd.conf file:

    Code:
    #CallUploadScript yes
    If this is uncommented (where the # has been removed), please re-add the # in front of this option. This option cannot be used with the cPanel installed copy of pure-ftpd
     
  13. pubudusj

    pubudusj New Member

    Joined:
    Jul 8, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    I set the passive port range on pure-ftpd.conf to 30000 50000 & set allowed the same in configserver firewall.
    Also the line on pure-ftpd.conf "#CallUploadScript yes" is as u mentioned commented.
    Restarted pureftpd as well as configserver firewall.
    Still I can't login with FTP.
    Can someone tell me what is wrong there?

    I even tried with disabling the firewall, but it is not working too :confused:

    My log on Filezilla client is as follows.
    Code:
    Command:	PASS ******
    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:	 AUTH TLS
    Response:	 PBSZ
    Response:	 PROT
    Response:	 ESTA
    Response:	 PASV
    Response:	 EPSV
    Response:	 SPSV
    Response:	 ESTP
    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 (50,30,32,76,146,90)
    Command:	MLSD
    Response:	150 Accepted data connection
    Response:	226-Options: -a -l 
    Response:	226 2 matches total
    Error:	Connection timed out
    Error:	Failed to retrieve directory listing
     
    #13 pubudusj, Jul 8, 2011
    Last edited: Jul 8, 2011
  14. cPanelMichael

    cPanelMichael Well-Known Member
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    17,523
    Likes Received:
    26
    Trophy Points:
    48
    Hello :)

    Were you able to run the command that Tristan suggested?

    Code:
    # ls -lah /home/xpazarla
    If the permission and ownership values look normal, please feel free to open a support ticket for this issue so we may check further:

    Submit A Ticket

    You can post the ticket number here so we may track the issue.

    Thank you.
     
  15. PDW

    PDW Member

    Joined:
    Dec 29, 2003
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    16
    Did you get this fixed with their help, what was the issue - I am havign the exact same problem - started today and I have had no issues before - I cant get ftp connect to to work. thanks
     
  16. storminternet

    storminternet Member

    Joined:
    Nov 2, 2011
    Messages:
    431
    Likes Received:
    0
    Trophy Points:
    16
    Paste the error here you are facing while connecting to ftp.
     
  17. cPanelJared

    cPanelJared cPanel Staff
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,835
    Likes Received:
    12
    Trophy Points:
    38
    Location:
    Houston, TX
    This thread was last updated over four months ago, and we are no longer seeing many instances of the CallUploadScript problem. If FTP is still not working for you, please submit a ticket so that we may log into the server and work with you individually. There is no charge for submitting a ticket.
     
Thread Status:
Not open for further replies.

Share This Page