This topic covers common connection, encoding, timeout, and data transmission issues with OSS FTP (ossftp).
Why can't I connect to the FTP server?
Check your credentials first. OSS FTP rejects connections when the AccessKey ID or AccessKey secret is incorrect. Re-enter the credentials and reconnect.
If you're using a RAM user's credentials, the RAM user may lack the required OSS permissions. Grant permissions based on what the RAM user needs to do:
| Task | Required permissions |
|---|---|
| Read data from a bucket | oss:ListObjects, oss:GetObject |
| Write data to a bucket | oss:ListObjects, oss:PutObject |
| Delete data from a bucket | oss:ListObjects, oss:DeleteObject |
For other scenarios, see Common examples of RAM policies.
Why does FileZilla return a 501 error when connecting on Linux?
If you see the following error when connecting with FileZilla on Linux:
501 can't decode path (server filesystem encoding is ANSI_X3.4-1968)The Chinese characters are not properly encoded. To fix this, set the locale to UTF-8 in the terminal where you run start.sh, then restart FileZilla:
export LC_ALL=en_US.UTF-8; export LANG="en_US.UTF-8"; localeWhy does the connection time out when I list objects after logging on?
OSS FTP lists all objects and directories in the bucket's root directory immediately after you log on. Up to 1,000 objects and directories can be listed per request. If your root directory contains more than 1,000,000 objects, the listing requires more than 1,000 consecutive requests, and the connection times out before completing.
Why does data transmission fail?
In passive mode, the FTP server opens a random port for the data connection. When the machine that runs the FTP server has port limits, data may fail to be transferred.
When ftpserver.py runs, specify --passive_ports_start and --passive_ports_end to set the range of local ports to be used and enable those ports.
Why does the client disconnect from the FTP server frequently?
The client disconnects because idle connections time out. To prevent this, disable the idle connection timeout in your FTP client. In FileZilla, go to Settings > Connection and set the timeout period to 0 (no timeout).