UFTPD(8)

πŸ“¦
version 2.17 Β· 2 versions
, in nixpkgs unstable

πŸ¦‹ UFTPD(8) β€” the system manager's manual, but make it make sense

okay bestie, so this is the uftpd(8) page from the System Manager's Manual πŸ’… and it's literally the manual for a TFTP/FTP server. no cap, it's shorter than you'd think. let's get into it ✨


🌸 NAME

uftpd β€” the No nonsense TFTP/FTP Server πŸ‘‘


✨ SYNOPSIS

uftpd [-hnsv] [-l LOG] [-o ftp=PORT,tftp=PORT,writable] [-p FILE] [PATH]

that's it. that's the whole vibe check 🫢


πŸ’– DESCRIPTION

uftpd is a very simple TFTP server and anonymous FTP server, and it's got inetd support too. it listens on the standard Internet ports for each protocol, as defined in the system service specification /etc/services β€” unless you give it other ports on the command line. for the deets, go see services(5) πŸ“–

if you run it with zero command line arguments, uftpd serves both FTP and TFTP and automatically backgrounds itself. usually that means it listens on port 21 (FTP) and port 69 (TFTP), serves files from /srv/ftp, and logs to syslog. messages get written to syslog using the LOG_FTP facility. iconic behaviour, honestly πŸ’…

here's the command line options, and yes we're going through all of them:

  • -h β€” shows the built-in help text πŸ†˜
  • -l LOG β€” sets the log level: none, err, notice, info, debug. by default the log level is notice, which is less verbose than info but still logs all the relevant events: users logging in, uploading, downloading, creating and removing directories, etc. wanna reduce the log level? start uftpd with -l error.
  • -n β€” runs in the foreground, does not detach from the controlling terminal πŸ–₯️
  • -o β€” sets a uftpd option; separate multiple options with a comma. the options are:
    • ftp=PORT
    • tftp=PORT
    • writable
    • pasv_addr=ADDR

these override the Internet ports otherwise derived from services(5). set the PORT to zero (0) to disable a service 🚫

the writable option enables a writable FTP root, which is not recommended. some people want this, but the recommendation is to instead rely on a writable sub-directory, like upload/, or similar. like... please just use a subdir bestie πŸ™ˆ

an address passed to the client in passive mode can be overridden with the pasv_addr option β€” the real data socket address stays unchanged. this may be useful for passing through some types of NAT 🌐

  • -p FILE β€” the file to store the process ID in, for signaling uftpd. the default depends on how uftpd was configured at build time, and also on the UNIX system it runs on, but often it's found in /var/run/uftpd.pid πŸ“Œ
  • -s β€” uses syslog, even if running in the foreground. this is the default when running in the background πŸ“
  • -v β€” shows the program version 🏷️
  • PATH β€” the root directory. the default is to serve files from the FTP user's $HOME. when started as root, uftpd will chroot to this directory as a security measure πŸ”’

🧚 Inetd

uftpd can also be used with an Internet superserver, like the traditional inetd or modern init replacements like finit. in inetd mode the server takes client connections from stdin. to enable inetd mode, uftpd must be called as either in.tftpd or in.ftpd πŸ‘€ in inetd mode uftpd always runs in the foreground with syslog for messages.


πŸŽ€ FTP

the file /etc/nologin can be used to disable FTP access. if the file exists, uftpd displays it and exits. if the file /etc/ftpwelcome exists, uftpd prints it before issuing the "ready" message. if the file /etc/motd exists, uftpd prints it after a successful login. and if the file .message exists in a directory, uftpd prints it when that directory is entered πŸ“‚

the FTP server currently supports the following requests. the case of the requests is ignored:

  • ABOR β€” abort current transfer
  • CDUP β€” shorthand for CD .. command
  • CWD β€” change working directory
  • CLNT β€” accepted and ignored by server
  • DELE β€” delete a file
  • EPRT β€” RFC 2428, extended PORT command
  • EPSV β€” extended PASV command, used by VLC for Android
  • FEAT β€” list supported features
  • HELP β€” show help text
  • LIST β€” give list files in a directory (ls -lgA)
  • MDTM β€” RFC 3659, return the last-modified time of a file
  • MLST β€” RFC 3659 extension to LIST
  • MLSD β€” RFC 3659 extension to LIST
  • MKD β€” make a directory
  • NLST β€” like LIST, but much less verbose
  • NOOP β€” do nothing, used for keep-alive
  • PASS β€” specify password
  • PASV β€” prepare for server-to-server transfer
  • PORT β€” specify data connection port
  • PWD β€” print the current working directory
  • QUIT β€” terminate session
  • REST β€” restore RETR or STOR command at file offset
  • RETR β€” retrieve a file
  • RMD β€” remove a directory
  • RNFR β€” specify rename-from file name
  • RNTO β€” specify rename-to file name
  • SIZE β€” return size of file
  • STOR β€” store a file
  • SYST β€” show operating system type of server system
  • TYPE β€” specify data transfer type
  • USER β€” specify user name

the remaining FTP requests, as specified in Internet RFC959, are not recognized at the moment. patches are welcome! 😭🫢


🌈 TFTP

uftpd also supports TFTP, the Trivial File Transfer Protocol, which is often used for net booting diskless devices, e.g. BOOTP and PXEBOOT πŸ‘Ÿ

the TFTP server currently supports the following requests:

  • RRQ β€” Read Request for file, may have options
  • WRQ β€” Write Request for file, may have options
  • DATA β€” File data, preceded by block n:o
  • ERROR β€” Error, end of session
  • ACK β€” ACKnowledge DATA or WRQ without options
  • OACK β€” Option acknowledged, sent as response to RRQ/WRQ

uftpd supports TFTP blocksize negotiation, according to RFC2348, so full sized Ethernet frames can be used, which greatly speeds up transfers ⚑ no cap, it's fast.


πŸ’œ FILES

  • /etc/ftpwelcome β€” FTP Welcome notice.
  • /etc/motd β€” Message of the day, presented after successful FTP login.
  • /etc/nologin β€” Displayed to user attempting to connect. Access is refused if this file exists.
  • /var/run/uftpd.pid β€” Program default PID file, created only when uftpd is ready with its internal setup and able to service signals. note, uftpd exits on most signals. so no special processing is done atm. πŸ’€

πŸ‘‘ SEE ALSO

ftp(1), tftp(1), syslogd(8)


🌸 AUTHORS

uftpd was written by Joachim Wiberg ⟨mailto:troglobit@gmail.com⟩ and is maintained at ⟨https://github.com/troglobit/uftpd⟩ 🫢


πŸ’€ BUGS

Here be dragons. πŸ‰


fr fr that's the whole page. no notes.

and that's a wrap, bestie β€” this was uftpd (2.14) from December 6, 2021, page UFTPD(8), signing off πŸŽ€βœ¨

πŸ“¦ where this page comes from
  • nixpkgs unstable: uftpd 2.17
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms