Home > Programming & scripting, Python > I made an FTP-server (easyFTPD v0.1)

I made an FTP-server (easyFTPD v0.1)

December 16th, 2007

… and you can get it here!

Setting up virtual users in most unix/linux-FTP-servers is actually a lot harder than it should be so I decided to create an easy to use FTP-server, targeted at virtual users.

I started off with an implementation using twisted but I soon found pyftpdlib which fitted this project perfectly. Since pretty much everything you need is already implemented, the application became reduced to programming a wrapper around pyftpdlib and setting it up for easy configuration and deployment.

The first version can be found here, and I really like the way it turned out. Creating virtual users are simply done by adding them to a users-file with the syntax

username:password:permissions:share_folder

where password might be a salted hash, or plaintext. More info on user configuration here.

Getting it running is as easy as first installing it by doing the following as superuser

python setup.py install

It can then be started with or without options

easyftpd              # Default settings
easyftpd -p 2100 -s   # Port 2100 and silent (no logging)
easyftpd -p 12345 -d  # Port 12345 and running as daemon

Information about more options and the configuration file can be found at the project page.

Hopefully I’m not the only one who has needed an easy to use FTP-server. proFTPD is simply too scary for me ;)

buffi Programming & scripting, Python

  1. Lee
    December 17th, 2007 at 03:30 | #1

    Check out pureftpd, it has a very robust (and simple) virtual-user system. To add a virtual user you would issue this command:

    pure-pw useradd username -d /home/user/dir -m

    This will add the user and rebuild the user database. It also has options to limit bandwidth and connections per user.

  2. December 18th, 2007 at 12:01 | #2

    That actually sounds quite awesome, I’ll have a look at it for sure.

  1. No trackbacks yet.