Chapter 11. FAQ

1. General Information
11.1.1. Can I run several servers on the same machine ?
11.1.2. When I start the server it displays no error but it isn't running (not present in the process list)
11.1.3. Site to site transfer (aka FXP) does not work !
11.1.4. I want to give access to a directory on another disk, should I choose symlinks or VFS ?
2. Linux
11.2.1. Server dies with error 'CRITICAL: shm exists with selected shm_key xxxxxx'
11.2.2. The precedent command (-d) does not work !
11.2.3. When I run the server with uid 0 (root) it complains it can't open file 'users' or commit changes
3. FreeBSD
11.3.1. I run wzdftpd and after that system says 'Bad system call(Core dumped)'
4. Config and commands
11.4.1. How do I add a custom site command ?
5. Backends
11.5.1. Can I edit the file 'users' ?

1. General Information

11.1.1. Can I run several servers on the same machine ?

Yes ! You will need to have a separate config file for each instance (look the -f option), and to specify at least different ports & shm key in each config file.

Remember wzdftp uses two shared memory zones, so do NOT specify consecutive keys.

11.1.2. When I start the server it displays no error but it isn't running (not present in the process list)

Check your log file !

If your server is compiled with TLS enabled, the most frequent error an invalid or absent certificate file. Error looks like:


SSL_CTX_use_certificate_file() error:0906D06C:PEM routines:PEM_read_bio:no start line
TLS subsystem could not be initialized.

11.1.3. Site to site transfer (aka FXP) does not work !

Before ANY complaint, please check that there are no firewall (hardware and/or software) between the two servers. Keep in mind that most of the time FXP and TLS are highly incompatible: firewall open dynamic ports by watching connection, and trying to detect usage of PORT or PASV commands. If you run in TLS mode, it is EVIDENT that the firewall will never detect the command (the connection is encrypted), thus won't open dynamic ports.

NAT (Network Address Translation) can also be a cause of problems, please check that the IP addresses send during port negotiation are correct.

When FXP fails, try to reverse passive and active sides of transfer: in FXP, one server is in PASV mode, the other in PORT mode. Sometimes the connection can fail in one direction and not in the other (often an effect of firewalls or NAT).

11.1.4. I want to give access to a directory on another disk, should I choose symlinks or VFS ?

In the general case, symlinks ! Symlinks are faster than VFS, can easily be manipulated online and are clearly more flexible than VFS.

VFS should only be used when you have several users with different home directories and want to easily give access to a special directory for all (e.g show a INSTALL directory in each user's homedir).

Symlinks can also be manipulated with scripts.

2. Linux

11.2.1. Server dies with error 'CRITICAL: shm exists with selected shm_key xxxxxx'

This means the server shared memory zone is already allocated, it can only happen in two cases: last execution crashed, or another server is running.

To remove a zone resulting from a crash (this should never happen :) just run (with options in the same order)

$PREFIX/sbin/wzdftpd -f $PREFIX/etc/wzdftpd/wzd.cfg -d

To run multiples instance of a ftp server look at "Running multiples instances.

You can also set the option force_shm_cleanup in the config file to automatically try to delete shm - this option can be DANGEROUS !

11.2.2. The precedent command (-d) does not work !

First of all, check that you have set option -f /path/to/configfile before option -d.

Else, let's play: get the id using

ipcs
and remove memory zones using
ipcrm shm id
If the memory zone is still there after running that as root, call an exorcist

11.2.3. When I run the server with uid 0 (root) it complains it can't open file 'users' or commit changes

Make sure files 'users' and 'users.OLD' are owned by same uid as specified in the server_uid directive in the config file.

chown ftp users users.OLD

When running the server with root privileges, you can specify a server_uid line in the config file to drop root privileges after binding to port < 1024. Note that this server does not need root privileges to run, it is designed to work in restricted user-mode (this is REALLY more secure !).

3. FreeBSD

11.3.1. I run wzdftpd and after that system says 'Bad system call(Core dumped)'

It means you need to recompile your kernel with shared memory support.

4. Config and commands

11.4.1. How do I add a custom site command ?

Add the definition to your config file:

ex: site_cmd = my_free /usr/local/bin/free.sh

You will also need to authorize users to use the command:

ex: -site_my_free = *

5. Backends

11.5.1. Can I edit the file 'users' ?

Yes, but carefully ! You must edit it offline (or the server will overwrite the file on next modification or at server exit).