This topic describes the possible problems you may encounter when you use ossftp and their solutions.

  • Failed to connect to the FTP server
    Possible causes:
    • The AccessKey ID and AccessKey secret are incorrect.

      Solution: Enter the correct information and try again.

    • The AccessKey information is the AccessKey pair of the RAM user account. The RAM user account is not authorized to list buckets.

      Solution: When you use a RAM user account for access, specify the bucket endpoint on the control page for the FTP server. At the same time, the RAM user account also needs some necessary permissions. For more information about how to use RAM to control access to OSS, see Overview. Details:

      • Read-only access

        To obtain the read-only permission when using ossftp, RAM users must obtain permissions to perform ListObjects, GetObject, and HeadObject. For more information about how to configure RAM policy, see Create RAM policies.

      • Upload objects

        To upload objects, RAM users must obtain the permission to perform PutObject.

      • Delete objects

        To delete objects, RAM users must obtain the permission to perform DeleteObject.

  • 501 and the corresponding error message are returned when you use FileZilla to transfer data after you run the FTP server in Linux
    501 can't decode path (server filesystem encoding is ANSI_X3.4-1968)
    The possible cause is that the Chinese character is not properly encoded. Run the following command on the terminal that runs and restart the terminal:
    $ export LC_ALL=en_US.UTF-8; export LANG="en_US.UTF-8"; locale
  • Disconnections due to timeout that occurs when you list objects after you log on to ossftp

    The possible cause is that the root directory of the bucket contains an excessive number of files or folders. After you log on to ossftp, the FTP server tries to list all objects and folders in the root directory of the bucket. A maximum of 1,000 objects and folders can be listed each time. If the root directory contains more than 1 million objects and folders, more than 1,000 HTTP requests are sent, which causes timeout.

  • Data fails to be transferred due to the port limit of the machine that runs the FTP server

    The control port and data port for FTP 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 where the FTP server resides has port limits, data may fail to be transferred.

    Solution: When runs, specify the --passive_ports_start and --passive_ports_end parameters to set the range of the local port and enable the ports that fall within the range.

  • Frequent disconnections between the client and FTP server

    Each FTP client has timeout configurations. You can disable timeout configurations or set the timeout value to 0. Take FileZilla as an example. Choose Settings > Connection. Set the timeout value to 0.