10.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. .

10.3.1. Config variables

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

Table 10-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
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)

10.3.2. User variables

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

Table 10-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 ?

10.3.3. Group variables

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

Table 10-3. Group variables

VariableDescription
homeGroup's default home directory
max_dlGroup's download limit
max_ulGroup's upload limit
nameGroup's login name
tagGroup's tagline (or description)

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