Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
FTP communication
-
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
paramiko
library 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
-
@sulcud, maybe take a look at an open-source C implementation like this one to get a working reference that you can translate into Python, bit by bit, while learning along the way?
-
By the way, there is a pure-Python
ftplib
module in the standard library, that's probably easier to read than a C version. (ftplib
is only an FTP client though, not a server.)