Hi Everyone, I know that the ftp commands are link text but how the communication actually work, for example when I want to request the content of a folder how the cliente send it for example:
Client send: “NLST <folder_name>“
Server response: <folder_content>
Is it the correct format to send a ftp command?
I make and ftp server, but it only works with my own ftp client because I don’t know how the commands have to be send.
And with what socket family it work?
@sulcud, do you have a strong reason for using something as outdated and insecure as FTP? Would you consider SSH and SFTP instead? Pythonista includes the
paramikolibrary that supports both server and client scenarios and simple file transfer operations.
@mikael You are right, FTP is completely insecure, and yes paramiko is perfect for secure communication, but I am doing a FTP Server from scratch because I want to understand how it works inside
By the way, there is a pure-Python
ftplibmodule in the standard library, that's probably easier to read than a C version. (
ftplibis only an FTP client though, not a server.)