heimdal-ftpd (8) Linux Manual Page
ftpd – Internet File Transfer Protocol server
Synopsis
[-a authmode ] [-dilvU ] [-g umask ] [-p port ] [-T maxtimeout ] [-t timeout ] [--gss-bindings ] [-I | –no-insecure-oob ] [-u default umask ] [-B | –builtin-ls ] [--good-chars= string ]
Description
Ftpd is the Internet File Transfer Protocol server process. The server uses the TCP protocol and listens at the port specified in the “ftp” service specification; see services(5). Available options:
-a- Select the level of authentication required. Kerberised login can not be turned off. The default is to only allow kerberised login. Other possibilities can be turned on by giving a string of comma separated flags as argument to –
aRecognised flags are:- plain
- Allow logging in with plaintext password. The password can be a(n) OTP or an ordinary password.
- otp
- Same as plain but only OTP is allowed.
- ftp
- Allow anonymous login.
The following combination modes exists for backwards compatibility:
- none
- Same as plain,ftp
- safe
- Same as ftp
- user
- Ignored.
-d- Debugging information is written to the syslog using LOG_FTP.
-g- Anonymous users will get a umask of umask
–gss-bindings- require the peer to use GSS-API bindings (ie make sure IP addresses match).
-i- Open a socket and wait for a connection. This is mainly used for debugging when ftpd isn’t started by inetd.
-l- Each successful and failed ftp(1) session is logged using syslog with a facility of LOG_FTP. If this option is specified twice, the retrieve (get), store (put), append, delete, make directory, remove directory and rename operations and their filename arguments are also logged.
-p- Use port (a service name or number) instead of the default ftp/tcp
-T- A client may also request a different timeout period; the maximum period allowed may be set to timeout seconds with the –
Toption. The default limit is 2 hours. -t- The inactivity timeout period is set to timeout seconds (the default is 15 minutes).
-u- Set the initial umask to something else than the default 027.
-U- In previous versions of
ftpdwhen a passive mode client requested a data connection to the server, the server would use data ports in the range 1024..4999. Now, by default, if the system supports the IP_PORTRANGE socket option, the server will use data ports in the range 49152..65535. Specifying this option will revert to the old behavior. -v- Verbose mode.
- –
B–-builtin-ls -
- use built-in ls to list files
- –
-good-chars=string -
- allowed anonymous upload filename chars
- –
I–-no-insecure-oob -
- don’t allow insecure out of band. Heimdal ftp clients before 0.6.3 doesn’t support secure oob, so turning on this option makes them no longer work.
The file /etc/nologin can be used to disable ftp access. If the file exists, displays it and exits. If the file /etc/ftpwelcome exists, prints it before issuing the “ready” message. If the file /etc/motd exists, prints it after a successful login. The ftp server currently supports the following ftp requests. The case of the requests is ignored.
Request TaDescriptionABOR Taabort previous commandACCT Taspecify account (ignored)ALLO Taallocate storage (vacuously)APPE Taappend to a fileCDUP Tachange to parent of current working directoryCWD Tachange working directoryDELE Tadelete a fileHELP Tagive help informationLIST Tagive list files in a directory (“ls -lgA” )MKD Tamake a directoryMDTM Tashow last modification time of fileMODE Taspecify data transfer modeNLST Tagive name list of files in directoryNOOP Tado nothingPASS Taspecify passwordPASV Taprepare for server-to-server transferPORT Taspecify data connection portPWD Taprint the current working directoryQUIT Taterminate sessionREST Tarestart incomplete transferRETR Taretrieve a fileRMD Taremove a directoryRNFR Taspecify rename-from file nameRNTO Taspecify rename-to file nameSITE Tanon-standard commands (see next section)SIZE Tareturn size of fileSTAT Tareturn status of serverSTOR Tastore a fileSTOU Tastore a file with a unique nameSTRU Taspecify data transfer structureSYST Tashow operating system type of server systemTYPE Taspecify data transfer typeUSER Taspecify user nameXCUP Tachange to parent of current working directory (deprecated)XCWD Tachange working directory (deprecated)XMKD Tamake a directory (deprecated)XPWD Taprint the current working directory (deprecated)XRMD Taremove a directory (deprecated)
The following commands are specified by RFC2228.
AUTH Taauthentication/security mechanismADAT Taauthentication/security dataPROT Tadata channel protection levelPBSZ Taprotection buffer sizeMIC Taintegrity protected commandCONF Taconfidentiality protected commandENC Taprivacy protected commandCCC Taclear command channel
The following non-standard or UNIX specific commands are supported by the SITE request.
UMASK Ta change umask, (e.g.
SITE UMASK 002
IDLE Ta set idle-timer, (e.g.
SITE IDLE 60
CHMOD Ta change mode of a file (e.g.
SITE CHMOD 755 filename
FIND Ta quickly find a specific file with GNU
HELP Ta give help information.
The following Kerberos related site commands are understood.
KAUTH Taobtain remote tickets.KLIST Tashow remote tickets
The remaining ftp requests specified in Internet RFC 959 are recognized, but not implemented. MDTM and SIZE are not specified in RFC 959, but will appear in the next updated FTP RFC. The ftp server will abort an active file transfer only when the ABOR command is preceded by a Telnet "Interrupt Process" (IP) signal and a Telnet "Synch" signal in the command Telnet stream, as described in Internet RFC 959. If a STAT command is received during a data transfer, preceded by a Telnet IP and Synch, transfer status will be returned. Ftpd interprets file names according to the “globbing” conventions used by csh(1). This allows users to use the metacharacters “*?[]{}~ ” Ftpd authenticates users according to these rules.
In the last case, ftpd takes special measures to restrict the client’s access privileges. The server performs a chroot(2) to the home directory of the “ftp” user. In order that system security is not breached, it is recommended that the “ftp” subtree be constructed with care, consider following these guidelines for anonymous ftp. In general all files should be owned by “root” and have non-write permissions (644 or 755 depending on the kind of file). No files should be owned or writable by “ftp” (possibly with exception for the ~ftp/incoming as specified below).
~ftp- The “ftp” homedirectory should be owned by root.
~ftp/bin- The directory for external programs (such as ls(1)). These programs must either be statically linked, or you must setup an environment for dynamic linking when running chrooted. These programs will be used if present:
ls- Used when listing files.
compress- When retrieving a filename that ends in .Z and that file isn’t present, will try to find the filename without .Z and compress it on the fly.
gzip- Same as compress, just with files ending in .gz
gtar- Enables retrieval of whole directories as files ending in .tar Can also be combined with compression. You must use GNU Tar (or some other that supports the –
zand –Zflags). locate- Will enable “fast find” with the
SITE FINDcommand. You must also create a locatedb file in ~ftp/etc
~ftp/etc- If you put copies of the passwd(5) and group(5) files here, ls will be able to produce owner names rather than numbers. Remember to remove any passwords from these files. The file motd if present, will be printed after a successful login.
~ftp/dev- Put a copy of /dev/null7 here.
~ftp/pub- Traditional place to put whatever you want to make public.
If you want guests to be able to upload files, create a ~ftp/incoming directory owned by “root” and group “ftp” with mode 730 (make sure “ftp” is member of group “ftp )” The following restrictions apply to anonymous users:
- Directories created will have mode 700.
- Uploaded files will be created with an umask of 777, if not changed with the –
goption. - These command are not accessible:
DELE , RMD , RNTO , RNFRSITE UMASKandSITE CHMOD - Filenames must start with an alpha-numeric character, and consist of alpha-numeric characters or any of the following:
+(plus),–(minus),=(equal),_(underscore),.(period), and,(comma).
Files
/etc/ftpusers- Access list for users.
/etc/ftpchroot- List of normal users who should be chroot’d.
/etc/ftpwelcome- Welcome notice.
/etc/motd- Welcome notice after login.
/etc/nologin- Displayed and access refused.
~/.klogin- Login access for Kerberos.
See Also
ftp(1), otp(1), getusershell(3), ftpusers(5), syslogd(8)
Standards
RFC 959- FTP PROTOCOL SPECIFICATION
RFC 1938- OTP Specification
RFC 2228- FTP Security Extensions.
Bugs
The server must run as the super-user to create sockets with privileged port numbers. It maintains an effective user id of the logged in user, reverting to the super-user only when binding addresses to sockets. The possible security holes have been extensively scrutinized, but are possibly incomplete.
History
The command appeared in BSD 4.2
