Support This Project

Installation

Linux (Debian)

Simply run apt-get install wzdftpd. Other packages are available: wzdftpd-mod-perl and wzdftpd-mode-tcl.

Linux (rpm-based distros)

rpms are available on sourceforge. Download the rpms you want to install, and run rpm -ivh wzdftpd-0.4.3-1.i386.rpm

FreeBSD

wzdftpd is in the ports list, so you can install it in the usual way. More details are given in ChapterFreeBSD

Windows

Installer files are packaged on sourceforge. Download and execute the installer.

You will need to download and install the OpenSSL binaries for Windows. For any extra modules/backends you want to use, you will have to download the appropriate software. Note that the installation of the 3rd party dependencies can be done after the wzdftpd installation has been completed.

You may additionally need to download and install the Microsoft Visual C++ 2008 runtime libraries.

First Configuration

Basics

The configuration is stored into one single file, called wzd.cfg. The server itself is composed of one executable (wzdftpd) and one lib (libwzd_core). You should also have another shared lib, the backend (libwzd_plaintext). This module will manage all users and groups, and the backend plaintext uses a simple text file (users) to store all the information related to users and groups.

Server Configuration

Edit wzd.cfg with your favorite editor (it is a simple text file). This file should be commented and easy to understand, you can refer to the Config File Directives reference for the complete list.

The important values you may want to change are the server port, the passive range, or the logs files location. Please also ensure the the server is allowed to write the pid file (config: pid_file).

Once the server configuration is ok, you can start the server, wzdftpd provides an init.d script to control server: /etc/init.d/wzdftpd start

Check that no error messages are displayed on screen, and that the process wzdftpd is running (ps ax | grep wzd should be enough). If the process is not present, check in wzdftpd's logs for details on error.

Adding first users

The server should be running now. To add the first users, we'll connect using an ftp client (I have a preference for console-based ones, especially for site commands, but any client will be ok). The default login is wzdftpd, and the password is wzdftpd. You have to connect from the same host where the server is installed for the first time, this is a basic security precaution. ex:

lftp -u wzdftpd localhost
Password:
lftp wzdftpd@localhost:~> site version
200 wzdftpd i686-pc-linux-gnu mt 0.5.0 build 20041021 (threads,debug,ipv6,utf8)

The site version command is not usefull, it is just here to check that the server is running, and that the login is ok.

Before adding the new user, we have to set the home directory for the group users. Home directories, like some other properties, are inherited by users when created in a group, so we'll position the homedir now.

lftp wzdftpd@localhost:/> site grpchange users homedir /home/ftp
200 Group field change successfull
lftp wzdftpd@localhost:/> site groups
200-
...
| users | 1:3 | 0 | 0 | 0 | /home |
...
200

Please also note that, by default, all users have an upload/download ratio of 1/3. If you want to remove the ratio, use the following:

lftp wzdftpd@localhost:/> site grpchange users ratio 0
200 Group field change successfull

Adding a new user is done from the client, using the site adduser command:

lftp wzdftpd@localhost:/> site adduser
501 site adduser <user> <password> [<group>] [<ip1> <ip2> <...>]

lftp wzdftpd@localhost:/> site adduser my_user my_pass users *@*
200 User added

The first command, site adduser without arguments, prints a small help message. Many commands are self-documented that way in wzdftpd. The second command adds a new user called my_user, with initial password my_pass. It also puts my_user in group users, and allows connection from any host (*@*), all in one command.