twoftpd-xfer(1)
π twoftpd-xfer β the TwoFTPD file transfer back-end, bestie
okay so real talk, this is twoftpd-xfer(1) from the General Commands Manual and she is the back-end baddie of the TwoFTPD situation. let's get into it π
β¨ NAME β¨
twoftpd-xfer β TwoFTPD file transfer back-end. she's the one actually moving the bytes, no cap.
πΈ SYNOPSIS πΈ
twoftpd-xfer
that's it. that's the whole vibe. no args, no flags, she just goes. π
π¦ DESCRIPTION π¦
okay so twoftpd-xfer reads FTP requests straight off the network and then executes file transfers based on whatever the client asked for. main character energy fr.
but before she does anything at all β like, before the vibes even start β she:
- changes directory to the authenticated user's home directory
- changes the root directory to that directory
- drops all root privileges
so yeah, she gets the security check out of the way first. responsible queen. π
π ENVIRONMENT π
these env vars are literally the whole personality. here's every single one, don't skip any bestie:
AUTHENTICATEDβ if this is set (usually bytwoftpd-authafter it successfully finishes authentication), the startup banner uses code230, which means "yay, auth worked." if it's not set, the startup banner uses code220instead, which is just the normal initial connection banner. two different eras. π«BANNERβ if set, whatever's in this variable gets sent as extra responses when the server starts. little hello note. π«ΆCHROOTβ if set, she changes the root directory to the user's home directory through the OSchrootsyscall. the real deal.CONNECT_TIMEOUTβ the max number of seconds to wait for a data channel connection to complete. if it's not set, it defaults to the value of$TIMEOUT. so like, it inherits. cute.GIDβ the numerical group ID number to change to at program startup.GIDSβ an optional comma-separated list of numerical group IDs to set up as the supplementary group IDs. (yes, "seperated" in the original, we keep the spelling, we don't fix what we don't own π )GROUPβ the group name to use in long listings for files owned by$GID. if it's not set, it defaults tomygroup.HOMEβ the directory to switch to on program startup.LOCKHOMEβ if set (and neitherCHROOTnorSOFTCHROOTare set), all accesses to files and paths outside ofHOMEwill be forbidden. like, locked down locked down. πLOGREQUESTSβ if set, all requests from the client get logged. receipts. πLOGRESPONSESβ if set, all responses to the client (after login) get logged.MESSAGEFILEβ if set, the contents of this file get automatically sent as extra responses to the client whenever the server enters a directory (including at startup). it's giving little welcome mat. π‘NODOTFILESβ if set, all listings exclude all files starting with a period, and it won't be possible to do any file access (including storing or retrieving) to any file starting with a period. this may be useful for anonymous FTP servers. dotfiles stay hidden, periodt. πSESSION_TIMEOUTβ the max number of seconds to allow a single session to last.SOFTCHROOTβ if set, andCHROOTis not set, the server emulates the effect of a chroot without actually effecting a chroot. so heads up bestie: this eliminates the system-enforced barrier that the chroot provides, but it does allow for things like symlinks outside of the home directory. trade-offs, we love to see them. βοΈTCPLOCALIPβ the IP to use when creatingPASVconnections. normally this is set bytcpserver.TCPREMOTEIPβ the source IP to use when creatingPORTconnections. normally this is set bytcpserver.TIMEOUTβ the max number of seconds to wait for command input or connections.UIDβ the numerical user ID number to change to at program startup.USERβ the owner name to use in long listings for files owned by$UID.
β NOTES β
okay important things, listen up:
you will need to set the umask to an appropriate value before running this program. don't forget, or it's over for you fr fr.
the twoftpd-anon program functions identically to this one, with the exception of having no file modification capabilities. and the twoftpd-drop program is a similarly restricted program, that can only create new files β no overwriting, no modifying, and no listing existing files. different girlies, different limits. π
and that's the whole page bestie!! π this was twoftpd-xfer(1) β from the General Commands Manual, footer girlie twoftpd-xfer(1), so go forth, set your env vars, and slay those transfers. mwah π«Άβ¨
π¦ where this page comes from
- ubuntu jammy: twoftpd 1.42-1.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms