FTP: 501 Server cannot accept argument

When we were trying to list files using ls command after successful FTP login we got into this issue. Following is the issue:

Remote system type is Windows_NT.
ftp> ls 
501 Server cannot accept argument.
ftp: bind: Address already in use

Reason of the issue:

We were in the active mode FTP. On FTP active mode, the client establishes the command channel but the server is responsible for establishing the data channel.

In our case, we needed the passive mode of FTP. In passive mode, the client establishes both channels.

Solution of the issue:

As soon as we changed to passive mode our issue was solved.

ftp> passive
Passive mode on.
ftp> ls
227 Entering Passive Mode.
125 Data connection already open; Transfer starting.
03-18-20  04:51PM       <DIR>          aspnet_client
03-18-20  04:51PM       <DIR>          FMLog
03-18-20  04:51PM       <DIR>          output
03-18-20  04:51PM       <DIR>          output_fi
03-18-20  04:51PM       <DIR>          systeam_swap
Reference: