twoftpd-xfer(1)

πŸ“¦ version 1.42, in ubuntu jammy

πŸ’… 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 by twoftpd-auth after it successfully finishes authentication), the startup banner uses code 230, which means "yay, auth worked." if it's not set, the startup banner uses code 220 instead, 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 OS chroot syscall. 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 to mygroup.
  • HOME β€” the directory to switch to on program startup.
  • LOCKHOME β€” if set (and neither CHROOT nor SOFTCHROOT are set), all accesses to files and paths outside of HOME will 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, and CHROOT is 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 creating PASV connections. normally this is set by tcpserver.
  • TCPREMOTEIP β€” the source IP to use when creating PORT connections. normally this is set by tcpserver.
  • 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