Home / Operating System / Linux / Simple FTP Server With Python

Simple FTP Server With Python

Simple FTP Server With Python

The solution uses pyftpdlib package. To install the package is really simple:

$ easy_install pyftpdlib


$ pip install pyftpdlib

after that create the folowing script and save it as a python file:

from pyftpdlib.authorizers import DummyAuthorizer

from pyftpdlib.handlers import FTPHandler

from pyftpdlib.servers import FTPServer

authorizer = DummyAuthorizer()

authorizer.add_user(“user”, “password”, “/home/user”, perm=”elradfmw”)


handler = FTPHandler

handler.authorizer = authorizer

server = FTPServer((“”, 21), handler)


Then run the script and try accessing your server using ftp.

Only 10 lines but it works like a charm, a very python way 🙂

Print Friendly

About dongpolice

Check Also

Xem số điện thoại đang dùng Vinaphone, Mobi, Viettel không cần gọi

Để biết số điện thoại mình đang dùng: – Ở Việt Nam có nhiều nhà …