This topic provides answers to some frequently asked questions about ossftp.

Failed connection to the FTP server

  • Problem description

    Note: The error message returned because the server failed to be connected.

  • Causes
    • The entered AccessKey ID and AccessKey secret are invalid.
    • The AccessKey ID and AccessKey secret of a RAM user are used. The RAM user does not have permissions to access Object Storage Service (OSS) resources.
  • Solutions
    • Enter the valid AccessKey ID and AccessKey secret, and reconnect to the server.
    • Grant the RAM user permissions based on your business requirements.

      The following section describes the required permissions for a RAM user in common scenarios:

      • Read data in an OSS bucket

        The oss:ListObjects and oss:GetObject permissions are required.

      • Write data to an OSS bucket

        The oss:ListObjects and oss:PutObject permissions are required.

      • Delete data from an OSS bucket

        The oss:ListObjects and oss:DeleteObject permissions are required.

      For more information about how to grant RAM users permissions in other scenarios, see Common examples of RAM policies.

501 error returned when you use FileZilla to connect to the FTP server

  • Problem description
    The HTTP status code 501 is returned when you run the FTP server on Linux and then use FileZilla to connect to the server.
    501 can't decode path (server filesystem encoding is ANSI_X3.4-1968)
  • Cause

    The Chinese characters are not properly encoded.

  • Solution
    1. Enter the following command in the terminal on which start.sh is run:
      $ export LC_ALL=en_US.UTF-8; export LANG="en_US.UTF-8"; locale
    2. Restart FileZilla.

Disconnections due to timeout that occurs when you list objects after you log on to ossftp

A large number of objects and directories are stored in the root directory of the bucket. After you log on to ossftp, the FTP server attempts to list all objects and directories in the root directory of the bucket. Up to 1,000 objects and directories can be listed at a time. If more than 1 million objects and directories are stored in the root directory, more than 1,000 requests are sent to list the objects and directories and therefore timeout occurs.

Failed data transmission

  • Cause

    The control port and the data port of the FTP server are different. When the FTP server needs to transfer data in passive mode, a port is randomly selected and enabled for connections to the client. When the machine that runs the FTP server has port limits, data may fail to be transferred.

  • Solution

    When ftpserver.py runs, specify the --passive_ports_start and --passive_ports_end options to set the range of the local ports to be used and enable the ports that fall within the range.

Frequent disconnections between the client and the FTP server

  • Cause

    The connection between the client and the FTP server times out.

  • Solution

    Specify that the connection between the client and the FTP Server does not time out. For example, choose Settings > Connection in FileZilla and then set the timeout period to 0.