9.3. Variables

wzdftpd gives a unified API to access server variables, user variables or group variables.

The following functions are provided as exported functions in the wzdftpd shared library, but all important modules (tcl ,perl, etc.) will wrap them into the corresponding langages. .

9.3.1. Config variables

These variables are configured in the config file. The following variable names are available for vars get/set:

Table 9-1. Config variables

VariableDescription
bwThe current cumulated bandwith of the server (downloads + uploads) (read-only)
login_pre_ip_check1 if server checks ip before login message, else 0
loglevelthe current log level (as a string)
max_dlThe download limit
max_ulThe upload limit
max_threadsThe maximum number of connected clients (read-only)
pasv_lowPassive range lower bound
pasv_highPassive range upper bound
portThe port the server is currently binded to (read-only)
uptimetime elapsed since server start (read-only)

9.3.2. User variables

These variables are configured in the backend. The following variable names are available for vars_user get/set:

Table 9-2. User variables

VariableDescription
creditsUser credits (0 means unlimited)
groupThe main group of the user
homeUser's home directory
max_dlUser's download limit
max_ulUser's upload limit
nameUser's login name
tagUser's tagline (or description)

addip, delip, flags, leech_slots, max_idle, num_logins, pass, perms, ratio, user_slots ?

9.3.3. Group variables

These variables are configured in the backend. The following variable names are available for vars_group get/set:

Table 9-3. Group variables

VariableDescription
homeGroup's default home directory
max_dlUser's download limit
max_ulUser's upload limit
nameUser's login name
tagUser's tagline (or description)

addip, delip, max_idle, num_logins, perms, ratio ?