FTP Secured TLS does connect but does not obtain directory listing.

Created:

2016-11-16 12:45:23 UTC

Modified:

2017-04-24 12:12:42 UTC

0

Was this article helpful?


Have more questions?

Submit a request

FTP Secured TLS does connect but does not obtain directory listing.

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 12.0 for Linux
  • Plesk 12.5 for Windows

Symptoms

  1. It is not possible to get a directory listing by FTP using Secured TLS.

  2. The connection establishes, but the following error appears:

    Error: Failed to retrieve directory listing
  3. Connection to FTP from localhost works fine.

    Status: Connecting to 203.0.113.2...
    Status: Connection established, waiting for welcome message...
    Status: Initializing TLS...
    Status: Verifying certificate...
    Status: TLS connection established.
    Status: Connected
    Status: Retrieving directory listing...

Cause

The root cause is in external or server firewall configuration.

Resolution

  1. Diagnose the issue by connecting to FTP server from localhost using lftp :

    lftp :~> set ssl:verify-certificate no
    lftp :~> set passive-mode yes
    lftp :~> set ssl-allow true
    lftp :~> open 127.0.0.1
    lftp 127.0.0.1:~> login user <PASSWORD>
    lftp user@127.0.0.1:~> debug
    lftp user@127.0.0.1:~> cd
    ---- Connecting to 127.0.0.1 (127.0.0.1) port 21
    .....
    cd ok, cwd=/
    lftp user@127.0.0.1:/> ls
    .....
    ---- Connecting data socket to (127.0.0.1) port 31868
    ---- Data connection established
    .....
    ---- Got EOF on data connection
    ---- Closing data socket
    drwxr-xr-x 2 user psacln 4096 Jul 16 15:48 error_docs
    drwxr-xr-x 2 root root 4096 Jul 16 15:50 ftp
    drwxr-xr-x 6 user psaserv 4096 Jul 16 15:48 httpdocs
    drwxr-xr-x 2 user root 4096 Jul 17 03:32 logs

    Directory listing works fine from localhost.

  2. Add the passive ports range by adding the following line to /etc/proftpd.conf :

    PassivePorts 61000 63000
  3. Check the firewall and open passive port range.

  4. Additionally, please refer to
Have more questions? Submit a request
Please sign in to leave a comment.