1 .\" Copyright (c) 1983, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" @(#)tftpd.8 8.1 (Berkeley) 6/4/93
35 .Nd Internet Trivial File Transfer Protocol server
39 .Op Fl F Ar strftime-format
47 utility is a server which supports the
48 Internet Trivial File Transfer
54 at the port indicated in the
59 The server is normally started by
64 does not require an account or password on the remote system.
65 Due to the lack of authentication information,
67 will allow only publicly readable files to be
69 Files containing the string
74 Files may be written only if they already exist (unless the
76 option is used) and are publicly writable (unless chrooted and the
79 Note that this extends the concept of
82 all users on all hosts that can be reached through the network;
83 this may not be appropriate on all systems, and its implications
84 should be considered before enabling tftp service.
85 The server should have the user ID with the lowest possible privilege.
87 Access to files may be restricted by invoking
89 with a list of directories by including up to 20 pathnames
90 as server program arguments in
92 In this case access is restricted to files whose
93 names are prefixed by the one of the given directories.
94 The given directories are also treated as a search path for
95 relative filename requests.
99 option provides additional security by changing
100 the root directory of
102 thereby prohibiting accesses to outside of the specified
106 requires super-user privileges,
110 However, after performing the
114 will set its user ID to that of the specified
125 Changes the default root directory of a connecting host via
127 based on the connecting IP address.
128 This prevents multiple clients from writing to the same file at the same time.
129 If the directory does not exist, the client connection is refused.
132 option is required for
140 except it falls back to
144 if a directory does not exist for the client's IP.
148 compatible format string for the creation of the suffix if
151 By default the string "%Y%m%d" is used.
152 .It Fl d, d Ar [value]
153 Enables debug output.
156 is not specified, then the debug level is increased by one
163 is specified, then the debug level is set to
165 The debug level is a bitmask implemented in
166 .Pa src/libexec/tftpd/tftp-utils.h .
167 Valid values are 0 (DEBUG_NONE), 1 (DEBUG_PACKETS), 2, (DEBUG_SIMPLE),
168 4 (DEBUG_OPTIONS), and 8 (DEBUG_ACCESS). Multiple debug values can be combined
169 in the bitmask by logically OR'ing the values. For example, specifying
172 will enable all the debug values.
174 Log all requests using
182 must also be enabled in the syslog configuration file,
185 Suppress negative acknowledgement of requests for nonexistent
188 Disable support for RFC2347 style TFTP Options.
189 .It Fl s Ar directory
192 to change its root directory to
194 After doing that but before accepting commands,
196 will switch credentials to an unprivileged user.
200 runs chrooted, the option allows write requests according to generic
201 file permissions, skipping requirement for files to be publicly writable.
202 The option is ignored for non-chrooted run.
204 Switch credentials to
211 The user must be specified by name, not a numeric UID.
215 for newly created files.
217 .Pq Dv S_IWGRP | S_IWOTH .
219 Allow write requests to create new files.
222 requires that the file specified in a write request exist.
223 Note that this only works in directories writable by the user
230 but append a YYYYMMDD.nn sequence number to the end of the filename.
231 Note that the string YYYYMMDD can be changed with the
244 The following RFC's are supported:
246 .%T RFC 1350: The TFTP Protocol (Revision 2)
249 .%T RFC 2347: TFTP Option Extension
252 .%T RFC 2348: TFTP Blocksize Option
255 .%T RFC 2349: TFTP Timeout Interval and Transfer Size Options
258 .%T RFC 7440: TFTP Windowsize Option
265 TFTP options are mentioned here:
268 .%U http://www.compuphase.com/tftp.htm
277 option was introduced in
281 option was introduced in
285 option was introduced in
291 options were introduced in
295 option was introduced in
298 Support for Timeout Interval and Transfer Size Options (RFC2349)
301 support for the TFTP Blocksize Option (RFC2348) and the blksize2 option
305 Edwin Groothuis <edwin@FreeBSD.org> performed a major rewrite of the
309 code to support RFC2348.
311 Support for the windowsize option (RFC7440) was introduced in
314 Files larger than 33,553,919 octets (65535 blocks, last one <512
315 octets) cannot be correctly transferred without client and server
316 supporting blocksize negotiation (RFCs 2347 and 2348),
317 or the non-standard TFTP rollover option.
320 accepts a sequence of block number which wrap to zero after 65535,
321 even if the rollover option is not specified.
323 Many tftp clients will not transfer files over 16,776,703 octets
324 (32767 blocks), as they incorrectly count the block number using
325 a signed rather than unsigned 16-bit integer.