ftpd(8)
π ftpd β the Internet File Transfer Protocol server, bestie edition π
okay so. this is the manual page for ftpd (that's the System Manager's Manual section, aka section 8, aka the "grown-up sysadmin stuff" zone) and honestly? she's iconic. she's literally the FTP server process. no cap.
β¨ SYNOPSIS β¨
ftpd [option ...]
π¦ DESCRIPTION π¦
so ftpd is the Internet File Transfer Protocol server process β the main character, fr fr. she speaks the TCP protocol and she listens at the port that's specified in the βftpβ service specification. wanna know more about that? go check out services(5). π
πΈ OPTIONS πΈ
okay bestie, here's where it gets juicy. every single one of these, no skips:
-4,--ipv4β restricts the daemon to listening on IPv4 addresses only. just the v4 girls.-6,--ipv6β restricts the daemon to listening on IPv6 addresses only. v6 supremacy, but only if you asked.-d,--debugβ debugging info gets written to the syslog, usingLOG_FTP. detective mode activated π-l,--loggingβ every successful and failedftp(1)session gets logged via syslog with a facility ofLOG_FTP. and if you specify this option twice? oh she's thorough β the retrieve (get), store (put), append, delete, make directory, remove directory and rename operations and their filename arguments get logged too. double it and give it to the next person π-A,--anonymous-onlyβ only anonymous login is allowed. that's it, that's the guest list. π-D,--daemonβftpdenters daemon-mode. this lets her run withoutinetd. she doesn't need a chaperone, okay? independent queen. π-q,--no-versionβ quiet mode. no info about the version of theftpdgets handed to the client. she's mysterious like that. π€«-T,--max-timeout timeoutβ a client can request a different timeout period, and the maximum period allowed can be set to timeout seconds with this-Toption. the default limit is 2 hours. know your limits bestie π-t,--timeout timeoutβ the inactivity timeout period gets set to timeout seconds. the default is 15 minutes. (ghost them for 15 min and they're gone π)-p,--pidfile pidfileβ changes the default location of the pidfile. moving day! π¦-a,--auth authβ gives anonymous another login-name (don't worry,anonymousandftpdwill still work). auth can be one of:defaultβ use passwd authentication.pamβ use the PAM service'ftp'.
--non-rfc2577β neglects RFC 2577 by giving out information on missing users. yikes, she's being a little messy on purpose. π-u,--umask valueβ sets the default umask to value.-?,--helpβ displays a help list. we love a self-aware icon.--usageβ displays a short usage message.-V,--versionβ displays the program version. π
π OPERATION π
the file /etc/nologin can be used to disable ftp access. if that file exists, ftpd displays it and exits. periodt. if the file /etc/ftpwelcome exists, ftpd prints it before issuing the βreadyβ message. and if the file /etc/motd exists, ftpd prints it after a successful login. β¨
the ftp server currently supports the following ftp requests. the case of the requests is ignored β she's not picky like that. π
ABORβ abort previous commandACCTβ specify account (ignored)ALLOβ allocate storage (vacuously)APPEβ append to a fileCDUPβ change to parent of current working directoryCWDβ change working directoryDELEβ delete a fileEPRTβ extended data connection port, RFC 2428EPSVβ extended passive transfer request, RFC 2428FEATβ display command extensionsHELPβ give help informationLISTβ give list files in a directory (βls -lgAβ)LPRTβ long data connection port, RFC 1639LPSVβ long passive transfer request, RFC 1639MKDβ make a directoryMDTMβ show last modification time of fileMODEβ specify data transfer modeNLSTβ give name list of files in directoryNOOPβ do nothingOPTSβ option settingsPASSβ specify passwordPASVβ prepare for server-to-server transferPORTβ specify data connection portPWDβ print the current working directoryQUITβ terminate sessionRESTβ restart incomplete transferRETRβ retrieve a fileRMDβ remove a directoryRNFRβ specify rename-from file nameRNTOβ specify rename-to file nameSITEβ non-standard commands (see next section π)SIZEβ return size of fileSTATβ return status of serverSTORβ store a fileSTOUβ store a file with a unique nameSTRUβ specify data transfer structureSYSTβ show operating system type of server systemTYPEβ specify data transfer typeUSERβ specify user nameXCUPβ change to parent of current working directory (deprecated)XCWDβ change working directory (deprecated)XMKDβ make a directory (deprecated)XPWDβ print the current working directory (deprecated)XRMDβ remove a directory (deprecated)
π SITE requests π
the following non-standard or UNIX specific commands are supported by the SITE request:
UMASKβ change umask, e.g.SITE UMASK 002IDLEβ set idle-timer, e.g.SITE IDLE 60CHMODβ change mode of a file, e.g.SITE CHMOD 755 filenameHELPβ give help information.
the remaining ftp requests specified in Internet RFC 959 are recognized, but not implemented. and heads up: MDTM and SIZE are not specified in RFC 959, but they will appear in the next updated FTP RFC. foreshadowing β¨
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. and if a STAT command is received during a data transfer β preceded by a Telnet IP and Synch β transfer status will be returned. very specific, very demure. π
ftpd interprets file names according to the βglobbingβ conventions used by csh(1). this lets users utilize the metacharacters β*?[]{}~β. slay. π
ftpd authenticates users according to three rules. (yes bestie, she says "three" and then lists four. we don't question the icon. π)
- The login name must be in the password data base,
/etc/passwd, and not have a null password. in this case a password must be provided by the client before any file operations may be performed. - The login name must not appear in the file
/etc/ftpusers. - The user must have a standard shell returned by
getusershell(3). - If the user name is
βanonymousβorβftpβ, an anonymous ftp account must be present in the password file (userβftpβ). in this case the user is allowed to log in by specifying any password (by convention an email address for the user should be used as the password).
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. so that system security is not breached, it is recommended that the βftpβ subtree be constructed with care, following these rules:
~ftpβ make the home directory owned byβrootβand unwritable by anyone.~ftp/binβ make this directory owned byβrootβand unwritable by anyone (mode555). the programls(1)must be present to support the list command. this program should be mode111.~ftp/etcβ make this directory owned byβrootβand unwritable by anyone (mode555). the filespasswd(5)andgroup(5)must be present for thelscommand to be able to produce owner names rather than numbers. the password field inpasswdis not used, and should not contain real passwords. the filemotd, if present, will be printed after a successful login. these files should be mode444.~ftp/pubβ make this directory mode777and owned byβftpβ. guests can then place files which are to be accessible via the anonymous account in this directory.
ok real talk bestie β that ~ftp setup section is the part you do not skip. security is the vibe. π
π§ FILES π§
/etc/ftpusersβ list of unwelcome/restricted users./etc/ftpchrootβ list of users to change root to their home directory./etc/ftpwelcomeβ welcome notice./etc/motdβ welcome notice after login./etc/nologinβ displayed and access refused.
β SEE ALSO β
ftp(1), getusershell(3), syslogd(8)
π BUGS π
the server must run as the super-user to create sockets with privileged port numbers. she 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. so like... mostly audited. not fully. be normal about it. π
π«Ά HISTORY π«Ά
the ftpd command appeared in 4.2BSD. she's been here. she's a legend. she's iconic. periodt. π
and that's the whole page, no cap β brought to you by GNU Network Utilities, dated February 9, 2019. love that for us. bye bestie, go secure your ~ftp ππβ¨
π¦ where this page comes from
- debian trixie: inetutils-ftpd 2:2.6-3+deb13u3
- ubuntu questing: inetutils-ftpd 2:2.6-1ubuntu3
- ubuntu questing: inetutils-ftpd 2:2.6-1ubuntu3.2
- ubuntu resolute: inetutils-ftpd 2:2.7-2ubuntu1
- ubuntu resolute: inetutils-ftpd 2:2.7-2ubuntu1.1
- ubuntu stonking: inetutils-ftpd 2:2.8-2ubuntu1
- Copyright (c) 1985, 1988, 1991, 1993 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms