Chapter 3. Commands Reference

site addip <user> <ip1> [<ip2> ...]

Add IP to user.

site addip toto 127.*
This will allow user "toto" to connect from any ip beginning by "127."

To check ident when user is connecting, just add 'ident@' before the ip.

site addip toto foobar@127.*

If you are a gadmin, you can only change users from your group.

site adduser <user> <password> [<group>] [<backend>]

Add a user, without any allowed ip. If group is specified, user will be added to the group (Note: only siteops can add users to a different group than their own group), otherwise the main group of the current user will be used.

User's homedir is determined using the value 'default_home' of the group. A default ratio is also set (1:3).

You MUST add an ip after.

ex: site adduser toto mypassword anonymous

If you are a gadmin, you can only add users from your group.

site backend <command> <backend_name>

Operations on backend. 'command' can be one of the following :

  • close: unload 'backend'. If you have no backend, or if backend is in use, the server will be in an unstable state !

  • commit: commits change to backend in a synchronous way. After the command, you can shutdown or reload the server in a safe way

  • init: loads a new backend. NO verifications are made - be sure of what you are doing !

  • reload: close and init a backend, without commiting it. This command allows you to modify backend and reload modifications. Modifications should be made carefully, especially if users are logged !

Backend name is the short name of the backend, not the name of the file (e.g: "plaintext", "mysql").
site backend commit plaintext
This is a DANGEROUS command

site chacl <user> <mode> <file> [<file2> ...]

Change access rights on a file or directory for a specific user/group

Always prefer the site chmod command when you can

site change <user> <field> <value>

Change a field for a user.

FieldDescription
flagsSet user's flags. This is similar to the site flags command For flags info see Flags Table. You can use '+flag' or '-flag' to add or remove flags, otherwise it will replace all existing flags.
groupAdd / remove user from group. site chgrp command is better, as it can handle several group changes in one command
homedirThis will change the user's homedir.
leech_slotsNumber of leech accounts a gadmin is allowed to add (done by "site change user ratio 0"). (GAdmin only)
max_idleSet the maximum idle time for this user. See the site idle command
max_ulUpstream bandwidth control in bytes/sec (0 = Unlimited).
max_dlSame but for downloads.
nameThis will change the user's login name. The modification is immediate, even if user is currently loggued !
num_loginsMaximum number of simultaneous logins.
passThis will change the user's password. This is similar to the site chpass command
permsSet user's default perms (All: 0xffffffff, retrieve only: 0x03). This command will change
ratioUser ratio
taglineUser's tagline. This is similar to the site tagline command
user_slotsNumber of users a gadmin is allowed to add. (GAdmin only)

If you are a gadmin, you can only change users from your group (except homedir, flags, and groups).

site changegrp <user> <group1> [<group2> ...]

For each group in list, add user to group or removes it if he/she already belongs to group.

site changegrp toto guest admin 

This will add user "toto" to group "admin" and remove "toto" from group "guest", if user had group "guest" before.

site checkperm <user> <file> <rights>

Check permission for a specific user.

site checkperm toto my_file RIGHT_RETR

Table 3-1. Permissions

PermissionDescription
RIGHT_LISTUser can list files (directory)
RIGHT_RETRUser can retrieve file
RIGHT_STORUser can upload file (directory) or can overwrite (file)
RIGHT_CWDUser can go into this directory
RIGHT_RNFRUser can rename file
RIGHT_MKDIRUser can create dir at current location
RIGHT_RMDIRUser can delete dir at current location
site chgrp <group> <file1> [<file2> ...]

Change file group

site chgrp admin dir1
This will give dir1 to group "admin", but not its content !

site chmod <mode> <file1> [<file2> ...]

Change permissions for "user" on files. Permissions are unix-like.

site chmod rwx dir1
is equivalent to
site chmod 755 dir1

site chown <user> <file1> [<file2> ...]

Change file owner

site chown toto dir1
This will give dir1 to user "toto", but not its content !

site chpass [<user>] <password>

Change user password.

ex: site chpass toto newpassword

This will change the password to 'newpassword' for the user 'toto'.

% denotes any password

If you are a gadmin, you can only change users from your group.

If no user name is specified, it changes your own password.

ex: site chpass newpassword
site chratio <user> <ratio>

Change user ratio

ex: site chratio toto 3

This will change the ratio to 1:3 for the user 'toto'.

A ratio of 0 means no ratio (leech access).

If you are a gadmin, you can only change users from your group. To give a ratio of 0 you need to have a free leech slot. If a gadmin sets back a ratio from 0 to a non-zero value, he gets back his leech slot.

site close

Close server for everyone except siteops.

This is mainly designed to temporarily close server for maintenance.

See the site reopen command

site color

Toggle use of color in server replies.

WARNING : This can kill many clients (especially graphical ones) !

site delip <user> <ip1/slot1> [<ip2/slot2> ...]

Delete ip from user. You can also use the ip number (given by "site who").

site delip toto 127.0.0.1
This will remove the ip "127.0.0.1" from user "toto".
site delip toto 1
This will remove ip #1 in ip list from user "toto"

"ip" can contain wildcards, but they are not interpreted.

site delip toto 127.*
This will remove the exact ip "127.*", and not all ip beginning by "127."

If an user has no authorized ip, he cannot login

If you are a gadmin, you can only change users from your group.

site deluser <user>

Delete a user, may be readded with site READD

site deluser toto

This will set the flag DELETED (D) for the user 'toto'. In order to fully delete this user you will need to do a 'site purge'

If you are a gadmin, you can only change users from your group.

site flags [<user>] [<newflags>]

Display a user's flags.

site flags

This will show your own flags

site flags toto

This will show flags of user toto

Table 3-2. Flags

FlagnameFlagDescription
SITEOPOUser is siteop
GADMINGUser is groupadmin of his/her first public group*
DELETEDDUser is deleted
IDLERIUser is allowed to idle forever
SEE_IPsUser is allowed to see other's ip
SEE_HOMEtUser is allowed to see other's home
HIDDENHUser will not appear in site who
TLSkUser will be forced to use TLS/SSL connections
TLS_DATAKUser will be forced to use TLS/SSL data connections
ANONYMOUSAUser cannot make any modifications
COLOR5Enable the use of color (toggle with site color)

If a second argument is provided, it will be used to change flags for user. You can use '+flag' or '-flag' to add or remove flags, otherwise it will replace all existing flags.

*NOTE* If you have flag O then you do NOT want flag G

If you are a gadmin, you can only change users from your group.

site free

Show free space in the current dir.

site ginfo <group>

Show detailed info on a group.

site gsinfo idlers

This will show detailed info (members, uploaded/downloaded files) on group 'idlers'

site give <user> <kbytes>

Gives credits to user (Taken from you)

site give toto 100000

This will give around 100mb of credits to user 'toto'

site groups

List groups and shows detailed informations

site grpadd <group> [<backend>]

Add a group. (Note: only siteops can add groups).

Group's defaultpath is determined using the value 'default_home' of your group, or your homedir if you have no group.

You MUST check all values after.

ex: site grpadd newgroup

site grpaddip <group> <ip>

Add IP to a group.

site grpaddip idlers 127.*
This will allow users from group "idlers" to connect from all ip beggining by "127."

To check ident when user is connecting, just add 'ident@' before the ip.

site grpaddip idlers foobar@127.*
site grpchange <group> <field> <value>

Change a field for a group.

FieldDescription
nameThis will change the group name. The modification is immediate, even if a user is currently loggued !
taglineGroup's tagline.
homedirThis will change the group's default homedir.
max_idleSet the maximum idle time for this group.
permsSet group's default perms (All: 0xffffffff, retrieve only: 0x03). This command will change
max_ulUpstream bandwidth control in bytes/sec (0 = Unlimited).
max_dlSame but for downloads.
ratioGroup default ratio
num_loginsMaximum number of simultaneous logins.

site grpdel <group>

Delete a group

site grpdel idlers

Unlike site deluser, the deletion is definitive (you can't readd deleted groups, so be carefull).

site grpdelip <group> <ip/slot>

Delete ip from group. You can also use the ip number (given by site gsinfo).

site grpdelip idlers 127.0.0.1
This will remove the ip "127.0.0.1" from group "idlers".
site grpdelip idlers 1
This will remove ip #1 in ip list from group "idlers"

"ip" can contain wildcards, but they are not interpreted.

site grpdelip idlers 127.*
This will remove the exact ip "127.*", and not all ip beginning by "127."

site grpkill <group>

Kill all users from a group

ex: site grpkill idlers

This will kick all members of the group 'idlers'.

User running the command will not be kicked even if member of the group.

site grpratio <group> <ratio>

Change group ratio

ex: site grpratio idlers 3

This will change the ratio to 1:3 for the group 'idlers'.

A ratio of 0 means no ratio (leech access).

Group ratio is used only when adding users in this group

site grpren <groupname> <newgroupname>

Renames a group

ex: site grpren ftp new_ftp

This will change the group name 'ftp' to 'new_ftp'.

All users in group 'ftp' will now automatically belong to 'new_ftp'.

site gsinfo <group>

Show system info on a group.

site gsinfo idlers

This will show system info (default home, ratio) on group 'idlers'

site help

Display helpscreen.

site idle [<idletime>]

This sets your idle-time (the amount of time you can be online without doing something) for this session only (unless commited to backend). Max idle-time is 7200 sec.

site idle

This will show your current idle-time settings

site idle 3600

This will set your idle-timeout to 3600 sec.

"site idle 0" for users that have the idle flag (I) will allow them to idle forever.

site invite <irc_nick>

Tells the sitebot to invite irc_nick on sitebot's channel.

site kick <user>

Kick a user off the site.

site kick toto

This will kill all connections for the user 'toto'

site kill <pid>

Kill a PID

site kill 345

This will kill pid #345 (if it belongs to a wzdftpd user)

site link create <dir> <linkname>, site link remove <linkname>

Create or removes symbolic links.

Both paths are given relative to the current user homedir.

NOTE: if the underlying filesystem supports symbolic links, they will be used, otherwise an abstraction layer is provided to have similar behaviour. Most unix filesystems support symbolic links.

site msg <show> | new <line> | append <line> | convert <file> | delete

Manage directory message file

site msg show
site perm <show> [<name>] | add <name> <perms> | change <name> <perms> | remove

Manage command permissions

site perm show site

This will show permissions for all site commands

site purge [<user>]

Remove deleted users, site READD will not work for purged users.

If run without arguments, purge ALL deleted users

site purge toto

This will erase definitively user 'toto' (only if it has been deleted).

If you are a gadmin, you can only purge users from your group (that is, if you are giving access to this command in your config file).

site readd <user>

Re-add a user.

site readd toto

This will remove the DELETED flag for user 'toto'

If you are a gadmin, you can only change users from your group.

site reload

Reload config file.

site reload

This will reload config file (wzd.cfg by default)

This is a DANGEROUS command

site reopen

Re-open server for everyone.

Usefull after server has been closed with the site close command

site rules

Display local site rules.

site shutdown

Shutdown the server. Users that are currently loggued are not kicked, and your connection is not closed. You will need to start the server on the machine.

site su <user>

Changes you current user ID, resulting in a user change. This is similar to the 'su' command on unix systems. This allow becoming a user without knowing his password and logging in as this user.

site su foobar

This will change your ID to become user foobar.

If you are a gadmin, you can only become a user from your group.

Unlike other ftpds, this is NOT emulation, you are really becoming the other user, and there is no way to turn back identity. This is why, by security, this command is restricted to siteops, and will be logged every time you use it.

site swho

Shows detailed information about users online.

site tagline [<tagline>]

Shows/Sets your tagline

site tagline

This will show your current tagline

site tagline my new tagline

This will set your tagline to 'my new tagline'

If you are a gadmin, you can only change users from your group.

site take <user> <kbytes>

Removes credits from user (this is not the opposite from site give, you are NOT granted from the same account)

site take toto 100000

This will remove 100mb of credits from user 'toto'

site user <user>

Show detailed informations for a user.

site users

List users and shows their group and detailed informations

site vars get <variable>

Access server variables. See the Config Variables list.

site vars_group get/set <groupname> <variable>

Display or change a value for a group. See the Group Variables list.

site vars_user get/set <username> <variable>

Display or change a value for a user. See the User Variables list.

site uptime

Display server uptime.

site version

Display server version.

site vfsadd |/ftp/vfsroot|/physical/path| [auth]

Add new VFS entry. See Virtual File System section for details.

site vfsadd |/home/ftp/etc|/etc/| +O

The new entry is NOT saved to config file !

site vfsdel /ftp/vfsroot

Remove a VFS entry.

site vfsdel /home/ftp/etc

Changes are NOT saved to config file !

site vfsls

List VFS entries.

site who

Show users online.

site wipe [-r] <file1> [<file2> ...]

Delete file (or directory). The difference with the standard removal functions is that the uploader does not loose credits and upload stats for the removed file.

To remove a directory and all subdirectories recursively, you can specify the -r option.

Be carefull, this command is quite dangerous !

xcrc "filename" [startpos length [start_crc]]

Gives CRC32 Checksum of the file

xcrc "1mB"

This will return the crc32 of the file

xcrc "1mB" 100 1500

This will return the crc32 of the file, only on the portion starting at 100, and on 1500 bytes.

xcrc "1mB" 100 1500 FE7F5BCE

This will do the same thing but with a starting crc of 0xFE7F5BCE

xmd5 "filename" [startpos length]

Gives MD5 Checksum of the file

xmd5 "1mB"

This will return the MD5 of the file

xmd5 "1mB" 100 1500

This will return the MD5 of the file, only on the portion starting at 100, and on 1500 bytes.