FTPD(8)
π FTPD(8) π
okay so bestie, you know how the System Manager's Manual has β¨theβ¨ server that handles all your file transfers? that's ftpd and she's literally the main character of DARPA Internet File Transfer Protocol energy π
πΈ NAME πΈ
ftpd β the DARPA Internet File Transfer Protocol server (yes she's iconic, no we don't talk about how old she is π
)
π¦ SYNOPSIS π¦
ftpd [-A |-a] [-C] [-c] [-d] [-E] [-l] [-v] [-T maxtimeout] [-t timeout]
[-p port] [-U ftpusers-file] [-u umask] [-r realm-file] [-s srvtab]
[-w{ip|maxhostlen[,{striplocal|nostriplocal}]}]
β¨ DESCRIPTION β¨
So Ftpd is literally the DARPA Internet File Transfer Protocol server process. She's out here using the TCP protocol and listening at the port that's specified in the "ftp" service specification β check services(5) if you need the tea π΅
The available options are giving config menu realness:
-Aβ connections are ONLY allowed for users who can authenticate via the ftpAUTHmechanism. (Anonymous ftp may also be allowed if it's configured.)Ftpdwill ask the user for a password if one is required. no password no entry, periodt π-aβ connections are ONLY allowed for users who can authenticate (via the ftpAUTHmechanism) AND who are authorized to connect to the named account without a password. (Anonymous ftp may also be allowed if it's configured.) stricter than-A, we love a high-standards queen π-Cβ non-anonymous users need local credentials (like, for authenticating to remote fileservers), so they should be prompted for a password unless they forwarded credentials as part of authentication. it's giving "bring your own vibes" β¨-cβ allows theCCC(Clear Command Channel) command to be used. This allows less secure connections, and should probably only be used when debugging. bestie this is lowkey risky β οΈ-dβ debugging information is written to the syslog. (Identical to-v) two names, same energy π«-Eβ don't allow passwords to be typed across unencrypted connections. protecting your secrets like a true bestie π«Ά-lβ eachftp(1)session is logged in the syslog. If this flag appears twice, additional information about operations performed (such as files retrieved, directories created, etc.) will be logged via syslog. If it appears three times, some other statistics such as the number of bytes transferred will be logged via syslog as well. the way she scales her logging? obsessed π-vβ debugging information is written to the syslog. (Identical to-d) yeah we already said that but she's cunty like that π-T maxtimeoutβ a client may request a maximum timeout period allowed set to timeout seconds with the-Toption. The default limit is 2 hours. This is different from the normal inactivity timeout specified by the-toption (see below). don't confuse these two, i beg of you π-t timeoutβ the inactivity timeout period is set to timeout seconds (the default is 15 minutes). she'll nap on you if you ghost her π€-p portβ run as a server and accept a connection on port. Normally the ftp server is invoked byinetd(8). but sometimes you wanna be independent, we respect that π-U ftpusers-fileβ sets the full path and name of the ftpusers file to use. The default value is normally/etc/ftpusers. know your files, know your power π-u umaskβ sets the umask for theftpdprocess. The default value is normally 027. permissions are a love language π-w {ip|maxhostlen[,{striplocal|nostriplocal}]}β controls the form of the remote hostname passed tologin(1). Specifyingipresults in the numeric IP address always being passed tologin(1). Specifying a number, maxhostlen, sets the maximum length of the hostname passed tologin(1)before it will be passed as a numeric IP address. If maxhostlen is0, then the system default, as determined by the utmp or utmpx structures, is used. Thenostriplocalandstriplocaloptions, which must be preceded by a comma, control whether or not the local host domain is stripped from the remote hostname. By default, the equivalent ofstriplocalis in effect. hostname formatting is literally an art form π¨
π the ftp requests she currently supports (case is not distinguished, she's chill like that)
ABORβ abort previous commandACCTβ specify account (ignored, she's not listening to that)ADATβ send an authentication protocol messageALLOβ allocate storage (vacuously, it's giving performative)APPEβ append to a fileAUTHβ specify an authentication protocol to be performedCCCβ set the command channel protection mode to "Clear" (no protection). Only available if the-ccommand-line option was given. insecure era but make it fashion πCDUPβ change to parent of current working directoryCWDβ change working directoryDELEβ delete a fileENCβ send a privacy and integrity protected command (given in argument)HELPβ give help informationLISTβ give list files in a directory (ls -lgArealness)MICβ send an integrity protected command (given in argument)MKDβ make a directoryMDTMβ show last modification time of fileMODEβ specify data transfer modeNLSTβ give name list of files in directoryNOOPβ do nothing (she's just vibing)PASSβ specify passwordPASVβ prepare for server-to-server transferPBSZβ specify a protection buffer sizePORTβ specify data connection portPROTβ specify a protection level under which to protect data transfersPWDβ print the current working directoryQUITβ terminate session (goodbye bestie π₯Ί)RESTβ 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, we're getting there)SIZEβ return size of fileSTATβ return status of serverSTORβ store a fileSTOUβ store a file with a unique name (special snowflake behavior)STRUβ 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, she's moved on)XCWDβ change working directory (deprecated)XMKDβ make a directory (deprecated)XPWDβ print the current working directory (deprecated)XRMDβ remove a directory (deprecated)
π the non-standard / UNIX specific commands she supports via 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. E.g.,SITE HELP
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. so like, she knows about them but she's not doing them yet, respect her process π¦
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. very specific, verydemure π
Ftpd interprets file names according to the "globbing" conventions used by csh(1). This allows users to utilize the metacharacters *?[]{}~. wildcards are her love language π₯
π how Ftpd authenticates users (the rules, bestie) π
- The user name must be in the password data base,
/etc/passwd. if you're not in the book, you're not getting in, periodt π - An
AUTHcommand must be accepted, the ensuing authentication protocol (conducted viaADATcommands and replies) must successfully complete, and the authenticated user must permitted access. Otherwise, a valid password which is not null must be provided by the client. no blank passwords, we're not doing that here π ββοΈ - The user name must not appear in the file
/etc/ftpusers. this file is the VIP list but like, the reverse π - The user must have a standard shell returned by
getusershell(3). no shell no service, simple as that π - 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 this is given as the client host's name). anonymous era, we love a public access moment π
π the anonymous ftp setup recommendations π
In the last case, ftpd takes special measures to restrict the client's access privileges. The server performs a chroot(2) command 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 β the following rules are recommended (and bestie, please follow them):
~ftpβ make the home directory owned by"ftp"and unwritable by anyone. she's the owner, respect her space π~ftp/binβ make this directory owned by the super-user and unwritable by anyone. The programls(1)must be present to support the list command. This program should have mode111. permissions are specific for a reason bestie π’~ftp/etcβ make this directory owned by the super-user and unwritable by anyone. The filespasswd(5)andgroup(5)must be present for thelscommand to be able to produce owner names rather than numbers. The password field in passwd is not used, and should not contain real encrypted passwords. These files should be mode444. don't put real secrets here, i'm literally begging you π~ftp/pubβ make this directory mode777and owned by"ftp". Users should then place files which are to be accessible via the anonymous account in this directory. this is the public plaza of your ftp world π
π the security extensions tea (ADAT, MIC, ENC, PROT) π
If an ADAT command succeeds, the control channel must be either integrity or privacy protected. In this case, the MIC and ENC commands are the only commands allowed over the control channel. The argument to the MIC command is a base 64 encoded string which, when decoded, is an ftp command integrity protected with a cryptographic checksum. The argument to the ENC command is a base 64 encoded string which, when decoded, is an ftp command privacy and integrity protected with encryption. she's speaking in code and it's iconic π
If an ADAT command succeeds, ftp replies will also be either integrity or privacy protected. consistency queen π
If an ADAT command succeeds, the data channel can also be integrity or privacy protected. The PROT command accepts S for integrity and P for privacy protection. Unless an ADAT command succeeds, the only protection level accepted by the PROT command is C (clear). so like, without ADAT you're stuck in clear mode, no upgrades, no protection, just vibes π
π«Ά SEE ALSO π«Ά
ftp(1), getusershell(3), syslogd(8)
Lunt, S. J., FTP Security Extensions, Internet Draft, November 1993. (academic queen π)
β οΈ BUGS β οΈ (the serious tea)
The anonymous account is inherently dangerous and should avoided when possible. like bestie, please, only use it if you HAVE to π
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. she's trying her best but security is a journey, not a destination π‘οΈ
π HISTORY π
The ftpd command appeared in 4.2BSD. she's been here since the beginning and she's not leaving π
so yeah, that's the whole vibe bestie β ftpd is out here running the DARPA Internet File Transfer Protocol server, handling connections, supporting all these commands, and keeping things secure (when you configure her right). she's from the System Manager's Manual, she's a 4.2BSD icon, and this page is dated like the classic queen she is. ftp forever π
β¨π
π¦ where this page comes from
- opensuse-leap 16.0: krb5-appl-servers 1.0.3-bp160.2.1 Β· MIT
- opensuse-leap 16.0: krb5-appl-servers 1.0.3-bp160.2.1 Β· MIT
- opensuse-leap 16.0: krb5-appl-servers 1.0.3-bp160.2.1 Β· MIT
- opensuse-leap 16.0: krb5-appl-servers 1.0.3-bp160.2.1 Β· MIT
- Copyright (c) 1985, 1988, 1991 The Regents of the University of California
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms