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

Failed connection to the FTP server

  • Problem description
  • Cause and solution
    • Cause: The entered AccessKey ID and AccessKey secret are invalid.

      Solution: Enter the correct AccessKey ID and AccessKey secret and then retry to connect to the server.

    • Cause: The AccessKey pair of a RAM user who does not have permissions to access Object Storage Service (OSS) is used.
      Solution: Grant the RAM user permissions based on your requirements. The following section describes required permissions in common scenarios:
      • Read-only permissions on an OSS bucket

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

      • Permissions to write data to an OSS bucket

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

      • Permissions to delete data in an OSS bucket

        The oss:ListObjects and oss:DeleteObjects 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 501 error code and corresponding error message are returned when you run the FTP server in 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.