ATFTPD(8)
π ATFTPD(8) β the atftpd manual, bestie edition π
okay so. you're here for atftpd, from the System Manager's Manual, and honestly? iconic behavior. let's get into it π«Ά
β¨ NAME β¨
atftpd β the Trivial File Transfer Protocol Server. yes girl, Trivial. lowercase t, lowercase f, capital T, capital P, capital D. she's serving files and she's serving looks π
β¨ SYNOPSIS β¨
atftpd [options] directory
β¨ DESCRIPTION β¨
so atftpd is a TFTP (RFC1350) server. on most systems it gets started by inetd by default, but bestie it can also run as a stand alone daemon if that's the vibe you want πΈ
this server is multi-threaded and supports literally all the options described in:
and she ALSO supports mtftp as defined in the PXE specification. multi-talented. main character energy fr fr π
β¨ OPTIONS β¨
this program supports both the usual GNU command line syntax β long options starting with two dashes (-) β as well as short options. here's the whole rundown, no skips, no cuts π
-t,--tftpd-timeout<value> β number of seconds of inactivity before the server exits. this value has meaning only when the server is started byinetd. in daemon mode, the server never exits. default is300seconds.-r,--retry-timeout<value> β how many seconds to wait for a reply before retransmitting a packet. default is5seconds. this can be overridden by the TFTP client with thetimeoutoption β¨-m,--maxthread<value> β maximum number of concurrent threads allowed. default is100.-v,--verbose[=value]β increase or set the logging level. no arguments will increase by one the current value. default isLOG_NOTICE, seesyslog(3)for log level. valid value range from0(LOG_EMERG) to7(LOG_DEBUG).--traceβ when verbose level is set to7, this will output debug information for each packet sent or received from the network. detective mode π--no-timeoutβ disabletimeoutfrom RFC2349. this will prevent the server from acknowledging thetimeoutoption requested by the client.--no-tsizeβ disabletsizefrom RFC2349. this will prevent the server from acknowledging thetsizeoption requested by the client.--no-blksizeβ disableblksizefrom RFC2348. this will prevent the server from acknowledging theblksizerequest by the client.--no-windowsizeβ disablewindowsizefrom RFC7440. this will prevent the server from acknowledging thewindowsizerequest by the client.--no-multicastβ disablemulticastfrom RFC2090. this will prevent the server from acknowledging themulticastrequest by the client.--logfile<logfile> β log to a specific file instead of only syslog.nobody(or any user used to run the server) must have permissions on the given file. assuming the file is/var/log/atftpd.log, simply run:"touch /var/log/atftpd.log"and then"chown nobody.nogroup /var/log/atftpd.log". when the server is run in daemon mode,/dev/stdoutor/dev/stderrcan be used. specifying a single dash as the filename will send logs to stdout (file descriptor1). slay, log it all π--pidfileβ write the PID of the server to the specified file. this may be useful when automatically starting and stopping one or more instance of the server.--daemonβ run as a daemon. do not use this option ifatftpdis started byinetd. seriously bestie, don't π--no-forkβ when--daemonis specified, this option will prevent the server from forking to background. it is useful for debugging purpose or specialized usage.--user<user[.group]> β by default, the server change identity to the usernobodyand groupnogroup. specify an alternateuser.groupwith this option.--group<group> β alternate way of specifying the group. if group is specified with--userand--group, the last option will be used.--port<number> β specify the port on whichatftpdlistens. useful when--daemonis specified. default is standard tftp port as determined bygetservbyname(3).--bind-address<IP address> β specify the IP address whichatftpdbinds to. useful when--daemonis specified. default is to bind to all interfaces. only one address can be specified, the server can only listen to one or all interfaces.--mcast-ttlβ specify the TTL to be used for multicast datagram. by default a value of1is used. note that TTL has a special meaning in multicast as it is used to determine the scope of the packets. the value of1means the packets don't leave the local network, seeip(4). scope may also be determine by the address as described RFC2365.--mcast-addrβ specify the IP address range to be used for multicast transfer. format string may comprise range and list of values:"239.255.0.0-31,128-132,200". default value is"239.255.0.0-255". this address range is proposed in RFC2365 for local scope.--mcast-portβ specify the UDP port to use for multicast transfer. format string may contain range and list of port number:"1758-2000,8000-9000". default value is"1758".--pcre<file> β specify a pattern/replacement file to use. this allows one to replace requested file name based on Perl Compatible Regular Expression. seeREADME.PCRE.--pcre-test<file> β test a pattern/replacement file. when using this option, the server will not start as usual but just read file name from stdin and printout the substitution. test run vibes π§--mtftp<file> β this will start a mtftp server thread for each valid entry in the supplied file. see PXE specification for detail about mtftp. an example file is provided in the source distribution.--mtftp-port<port> β port the mtftp server shall listen to for incoming request.--no-source-port-checkingβ in some specific cases of networks using load balancer or other equipment performing NAT (network address translation), some needs to disable source port checking because port number as been translated. if you want to use this feature, you must know why you need it and the implication. be aware that this option violate the RFC1350. this option has effect only for non-multicast transfer.--prevent-sasβ address the Sorcerer's Apprentice Syndrome situation as requested by RFC 1350. this RFC requires repeated responses to a single packet to be rejected. thus a block will only get retransmitted on a timeout. for backward compatibility, the default stays to ignore this RFC. so blocks get transmitted on every request.--mcast-switch-clientβ this option allows the server to proceed with the next multicast client as soon as the current client timeout. when the current master client fails to send an acknowledge (ACK) to the server, the server will send an option acknowledge (OACK) to the master client with the fieldMC(master client) set tofalseand send an OACK to the next multicast client withMCset totrue. without this option, the server will retry the current master client up to5times and then mark it done, proceeding with the next one.-V,--versionβ show version of program.-h,--helpβ show summary of options.pathβ this is the root directory used by the TFTP server. all requested files from a TFTP client must reside in this directory. if not specified, the directory defaults to/tftpboot. sinceatftpdrun as thenobodyuser, the permission of the directory must be set properly to allow file reading and writing. π
β¨ STATS β¨
starting with release 0.2, the server collects some statistics. currently the server compute system load, time between connections and some thread statistics like number of file sent, received, number of abort... π
to see those stats in the logs, you need to set --verbose=6 (LOG_NOTICE) or higher.
β¨ SECURITY β¨
okay bestie, deep breath. TFTP by itself has no provision for security. there is no user authentication and TFTP clients get access to all files within the specified root directory for which the server has permission. that's just how she is π
some level of security can be gained using atftp libwrap support. adding proper entry to /etc/hosts.allow and /etc/hosts.deny will restrict access to trusted hosts. daemon name to use in these files is in.tftpd.
β¨ PCRE β¨
the atftpd server provides a way to dynamically replace requested file name by a new one based on Perl compatible regular expression. pairs of pattern/replacement are read from the specified files. upon reception of a read request, the server will first try to open the file name requested. if it fails, then it will search for a replacement based on the content of the pattern file. if this still fails, then an error will be sent to the client.
this feature is available only for read request. it makes no sense doing this substitution for client writing files to the server.
β¨ MTFTP β¨
the mtftp name refer to multicasrt tftp as define by the PXE specification. see pxespec.txt for the source of the specification. note that this is not the same as RFC2090. PXE compliant boot implements mtftp, not RFC2090.
β¨ SEE ALSO β¨
inetd(8), hosts_access(5), libpcre(7), RFC1350, RFC2090, RFC2347, RFC2348, RFC2349 and pxespec.pdf. go read them, they're lowkey good for you π
β¨ AUTHOR β¨
this manual page was written by Remi Lefebvre <remi@debian.org> and Jean-Pierre Lefebvre <helix@step.polymtl.ca>. legends, honestly π«Ά
and that's the whole page bestie!! this ATFTPD(8) manual page dates all the way back to December 27, 2000 π she's been serving TFTP files and slaying since before you were born, and she still ate. periodt π πβ¨π¦π
π¦ where this page comes from
- arch rolling: atftp 0.8.1-1 Β· GPL
- debian bookworm: atftpd 0.8.0-3 Β· GPL-2.0-or-later
- debian trixie: atftpd 0.8.0-8 Β· GPL-2.0-or-later
- nixos 26.05: atftp 0.8.1
- nixpkgs unstable: atftp 0.8.1
- ubuntu jammy: atftpd 0.7.git20210915-4 Β· GPL-2.0-or-later
- ubuntu jammy: atftpd 0.7.git20210915-4build1 Β· GPL-2.0-or-later
- ubuntu noble: atftpd 0.8.0-3ubuntu3 Β· GPL-2.0-or-later
- ubuntu questing: atftpd 0.8.0-8
- ubuntu resolute: atftpd 0.8.0-8build1 Β· GPL-2.0-or-later
- ubuntu stonking: atftpd 0.8.1-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms