zoukankan      html  css  js  c++  java
  • I can connect to an FTP site but I can't list or transfer files.

    原文

    FTP sessions use two network connections:

    1. The control channel is for user authentication and sending commands and ...

    2. The data channel is for transferring files and directory listings.

    If you can connect to an FTP server but not transfer files or directory listings, the most likely cause is a blocked data channel.

    More About FTP Control Channels

    FTP sessions are established on the FTP control channel. If you are able to connect and authenticate then your control channel is probably fine. The default port is 21 for most control channels except for FTPS Implicit connections for which 990 is the default. Use the /port=x option of the FTPLOGON command to make Robo-FTP attempt a control channel connection on a specific port.

    More About FTP Data Channels

    FTP data channels are opened and closed as needed during an FTP session. There are two methods or opening a data channel:

    1. Passive Mode is the preferred data channel method for modern FTP clients because, in this mode, the client opens an outbound connection to a port specified by the server. A client sends the PASV command to request that a server allow an inbound data channel connection. The server responds with an IP address and port number on which it will be waiting for the client to open a connection.

    2. Active Mode is falling out of favor because it requires that the server make an inbound connection to the client computer. When a client requests an active mode connection, it sends the PORT command along with its IP address and the port where it will be waiting for the server to open a connection.

    Beginning with version 3.7 Robo-FTP defaults to passive mode because, in our experience, the chances of making a successful outbound connection are higher than those of accepting a successful inbound connection.

    Troubleshooting

    When you can connect but not list or transfer files, the first troubleshooting step should be to try the opposite data channel mode. In Robo-FTP, add the /pasv=false option to the FTPLOGON command line to use active mode or remove it to revert to the default passive mode.

    If you are using passive mode data connections:

    1. Contact the owner of the FTP server and ask "What is your passive port range?" then ask your network administrator to allow outboundconnections to the FTP server on that port range.

    2. Decode the port number from the server's PASV response (see below) and then use the Classic TCP-only Javascript Client onwww.firebind.com to test outbound connectivity on that port.

    If you are using active mode data connections:

    1. Ask your network administrator to allow inbound connections to your computer and then use the /minport/maxport and /myipaddroptions of the FTPLOGON command to force Robo-FTP to send a public IP address in an allowed port range.

    Decoding port numbers

    Examine the Trace Log and find the PORT or PASV command. There should be six digits separated by commas. To decode the port number, take the 5th number and multiple by 256 then add the 6th number. For example, if your Trace Log contains this:

    ->- PASV
    -<- 227 Entering Passive Mode (209,198,133,148,170,225)
    

    This means that the server is waiting for an incoming passive mode data channel connection on port 43745

    43745 = (170 * 256) + 225
  • 相关阅读:
    最佳实践丨三种典型场景下的云上虚拟IDC(私有池)选购指南
    总渲染时长超3亿核小时,阿里云助力《白蛇2:青蛇劫起》提升视效
    阿里云成为首个通过“虚拟化云平台性能测试(大规模)”的云厂商
    AI性能提升2-3倍!搭载 NVIDIA A10 GPU的阿里云gn7i服务器开启邀测
    最佳实践丨阿里云ECI如何助力西软构建酒店行业多租户高弹性PaaS平台?
    暑期大放“价”,轻量应用服务器9元包月!
    报名通道开启!原生安全二倍速:探秘基础设施的内生“免疫系统"
    40万奖金等你来挑战!阿里云ECS Cloudbuild开发者大赛重磅开启
    Ubuntu安装桌面环境
    tinkphp3.0 execl导出问题
  • 原文地址:https://www.cnblogs.com/philzhou/p/3319833.html
Copyright © 2011-2022 走看看