1ea022d16SRodney W. Grimes.\" Copyright (c) 1983, 1991, 1993 2ea022d16SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 3ea022d16SRodney W. Grimes.\" 4ea022d16SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 5ea022d16SRodney W. Grimes.\" modification, are permitted provided that the following conditions 6ea022d16SRodney W. Grimes.\" are met: 7ea022d16SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 8ea022d16SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 9ea022d16SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 10ea022d16SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 11ea022d16SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 12ea022d16SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software 13ea022d16SRodney W. Grimes.\" must display the following acknowledgement: 14ea022d16SRodney W. Grimes.\" This product includes software developed by the University of 15ea022d16SRodney W. Grimes.\" California, Berkeley and its contributors. 16ea022d16SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors 17ea022d16SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 18ea022d16SRodney W. Grimes.\" without specific prior written permission. 19ea022d16SRodney W. Grimes.\" 20ea022d16SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21ea022d16SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22ea022d16SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23ea022d16SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24ea022d16SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25ea022d16SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26ea022d16SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27ea022d16SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28ea022d16SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29ea022d16SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30ea022d16SRodney W. Grimes.\" SUCH DAMAGE. 31ea022d16SRodney W. Grimes.\" 32ea022d16SRodney W. Grimes.\" @(#)tftpd.8 8.1 (Berkeley) 6/4/93 33229494cbSMike Pritchard.\" $FreeBSD$ 34ea022d16SRodney W. Grimes.\" 3567c31d50SGarrett Wollman.Dd September 14, 2000 36ea022d16SRodney W. Grimes.Dt TFTPD 8 37ea022d16SRodney W. Grimes.Os BSD 4.2 38ea022d16SRodney W. Grimes.Sh NAME 39ea022d16SRodney W. Grimes.Nm tftpd 40eb083802SRuslan Ermilov.Nd Internet Trivial File Transfer Protocol server 41ea022d16SRodney W. Grimes.Sh SYNOPSIS 42a8faeabcSPhilippe Charnier.Nm /usr/libexec/tftpd 431ed0e5d2SBill Fumerola.Op Fl cCln 448ea31785SWarner Losh.Op Fl s Ar directory 45f62eaadfSGarrett Wollman.Op Fl u Ar user 46ea022d16SRodney W. Grimes.Op Ar directory ... 47ea022d16SRodney W. Grimes.Sh DESCRIPTION 48ea022d16SRodney W. Grimes.Nm Tftpd 49ea022d16SRodney W. Grimesis a server which supports the 50ea022d16SRodney W. GrimesInternet Trivial File Transfer 51f62eaadfSGarrett WollmanProtocol 52f62eaadfSGarrett Wollman.Pq Tn RFC 1350 . 53ea022d16SRodney W. GrimesThe 54ea022d16SRodney W. Grimes.Tn TFTP 55ea022d16SRodney W. Grimesserver operates 56ea022d16SRodney W. Grimesat the port indicated in the 57ea022d16SRodney W. Grimes.Ql tftp 58ea022d16SRodney W. Grimesservice description; 59ea022d16SRodney W. Grimessee 60ea022d16SRodney W. Grimes.Xr services 5 . 61ea022d16SRodney W. GrimesThe server is normally started by 62ea022d16SRodney W. Grimes.Xr inetd 8 . 63ea022d16SRodney W. Grimes.Pp 64ea022d16SRodney W. GrimesThe use of 65ea022d16SRodney W. Grimes.Xr tftp 1 66ea022d16SRodney W. Grimesdoes not require an account or password on the remote system. 67ea022d16SRodney W. GrimesDue to the lack of authentication information, 68a8faeabcSPhilippe Charnier.Nm 69ea022d16SRodney W. Grimeswill allow only publicly readable files to be 70ea022d16SRodney W. Grimesaccessed. 7120271f30SWarner LoshFiles containing the string ``/\|\fB.\|.\fP\|/'' or starting with 7220271f30SWarner Losh``\|\fB.\|.\fP\|/'' are not allowed. 73ea022d16SRodney W. GrimesFiles may be written only if they already exist and are publicly writable. 74ea022d16SRodney W. GrimesNote that this extends the concept of 75ea022d16SRodney W. Grimes.Dq public 76ea022d16SRodney W. Grimesto include 77ea022d16SRodney W. Grimesall users on all hosts that can be reached through the network; 78ea022d16SRodney W. Grimesthis may not be appropriate on all systems, and its implications 79ea022d16SRodney W. Grimesshould be considered before enabling tftp service. 80ea022d16SRodney W. GrimesThe server should have the user ID with the lowest possible privilege. 81ea022d16SRodney W. Grimes.Pp 82ea022d16SRodney W. GrimesAccess to files may be restricted by invoking 83a8faeabcSPhilippe Charnier.Nm 84ea022d16SRodney W. Grimeswith a list of directories by including up to 20 pathnames 85ea022d16SRodney W. Grimesas server program arguments in 86ea022d16SRodney W. Grimes.Pa /etc/inetd.conf . 87ea022d16SRodney W. GrimesIn this case access is restricted to files whose 88ea022d16SRodney W. Grimesnames are prefixed by the one of the given directories. 89ea022d16SRodney W. GrimesThe given directories are also treated as a search path for 90ea022d16SRodney W. Grimesrelative filename requests. 91ea022d16SRodney W. Grimes.Pp 92f62eaadfSGarrett WollmanThe 93a8faeabcSPhilippe Charnier.Fl s 94f62eaadfSGarrett Wollmanoption provides additional security by changing 9576081989SRuslan Ermilov.Nm Ns No 's 96f62eaadfSGarrett Wollmanroot directory, thereby prohibiting accesses outside of the specified 97f62eaadfSGarrett Wollman.Ar directory . 98f62eaadfSGarrett WollmanBecause 99f62eaadfSGarrett Wollman.Xr chroot 2 100f62eaadfSGarrett Wollmanrequires super-user privileges, 101a8faeabcSPhilippe Charnier.Nm 102f62eaadfSGarrett Wollmanmust be run as root. 103f62eaadfSGarrett WollmanHowever, after performing the 104f62eaadfSGarrett Wollman.Fn chroot , 105a8faeabcSPhilippe Charnier.Nm 106f62eaadfSGarrett Wollmanwill set its user id to that of the specified 107f62eaadfSGarrett Wollman.Ar user , 108f62eaadfSGarrett Wollmanor 109f62eaadfSGarrett Wollman.Dq nobody 110f62eaadfSGarrett Wollmanif no 111f62eaadfSGarrett Wollman.Fl u 112f62eaadfSGarrett Wollmanoption is specified. 1138ea31785SWarner Losh.Pp 114ea022d16SRodney W. GrimesThe options are: 115ea022d16SRodney W. Grimes.Bl -tag -width Ds 1161ed0e5d2SBill Fumerola.It Fl c 1171ed0e5d2SBill FumerolaChanges the default root directory of a connecting host via chroot based on the 1181ed0e5d2SBill Fumerolaconnecting IP address. 1191ed0e5d2SBill FumerolaThis prevents multiple clients from writing to the same file at the same time. 1201ed0e5d2SBill FumerolaIf the directory does not exist, the client connection is refused. 1211ed0e5d2SBill FumerolaThe 1221ed0e5d2SBill Fumerola.Fl s 1231ed0e5d2SBill Fumerolaoption is required for 1241ed0e5d2SBill Fumerola.Fl c 1251ed0e5d2SBill Fumerolaand the specified 1261ed0e5d2SBill Fumerola.Ar directory 1271ed0e5d2SBill Fumerolais used as a base. 1281ed0e5d2SBill Fumerola.It Fl C 1291ed0e5d2SBill FumerolaOperates the same as 1301ed0e5d2SBill Fumerola.Fl c 1311ed0e5d2SBill Fumerolaexcept it falls back to 1321ed0e5d2SBill Fumerola.Fl s Ns No 's 1331ed0e5d2SBill Fumerola.Ar directory 1341ed0e5d2SBill Fumerolaif a directory does not exist for the client's IP. 135ea022d16SRodney W. Grimes.It Fl l 136a8faeabcSPhilippe CharnierLog all requests using 1373dead0b6SJoseph Koshy.Xr syslog 3 138f62eaadfSGarrett Wollmanwith the facility of 139f62eaadfSGarrett Wollman.Dv LOG_FTP . 140f62eaadfSGarrett WollmanNote: Logging of 141f62eaadfSGarrett Wollman.Dv LOG_FTP 142f62eaadfSGarrett Wollmanmessages 143f62eaadfSGarrett Wollmanmust also be enabled in the syslog configuration file, 1443dead0b6SJoseph Koshy.Xr syslog.conf 5 . 145ea022d16SRodney W. Grimes.It Fl n 146a8faeabcSPhilippe CharnierSuppress negative acknowledgement of requests for nonexistent 147ea022d16SRodney W. Grimesrelative filenames. 1488ea31785SWarner Losh.It Fl s Ar directory 149a8faeabcSPhilippe CharnierCause 150a8faeabcSPhilippe Charnier.Nm 151f62eaadfSGarrett Wollmanto change its root directory to 152f62eaadfSGarrett Wollman.Pa directory . 153f62eaadfSGarrett WollmanAfter changing roots but before accepting commands, 154a8faeabcSPhilippe Charnier.Nm 155f62eaadfSGarrett Wollmanwill switch credentials to an unprivileged user. 156f62eaadfSGarrett Wollman.It Fl u Ar user 157f62eaadfSGarrett WollmanSwitch credentials to 158f62eaadfSGarrett Wollman.Ar user 159f62eaadfSGarrett Wollman(default 160f62eaadfSGarrett Wollman.Dq nobody ) 161f62eaadfSGarrett Wollmanwhen the 162f62eaadfSGarrett Wollman.Fl s 163f62eaadfSGarrett Wollmanoption is used. 164f62eaadfSGarrett WollmanThe user must be specified by name, not a numeric UID. 165ea022d16SRodney W. Grimes.El 166ea022d16SRodney W. Grimes.Sh SEE ALSO 167ea022d16SRodney W. Grimes.Xr tftp 1 , 168f62eaadfSGarrett Wollman.Xr chroot 2 , 1693dead0b6SJoseph Koshy.Xr inetd 8 , 1703dead0b6SJoseph Koshy.Xr syslogd 8 171f62eaadfSGarrett Wollman.Rs 172f62eaadfSGarrett Wollman.%A K. R. Sollins 173f62eaadfSGarrett Wollman.%T The TFTP Protocol (Revision 2) 174f62eaadfSGarrett Wollman.%D July 1992 175f62eaadfSGarrett Wollman.%O RFC 1350, STD 33 176f62eaadfSGarrett Wollman.Re 177ea022d16SRodney W. Grimes.Sh HISTORY 178ea022d16SRodney W. GrimesThe 179ea022d16SRodney W. Grimes.Nm 180ea022d16SRodney W. Grimescommand appeared in 18167c31d50SGarrett Wollman.Bx 4.2 ; 18267c31d50SGarrett Wollmanthe 18367c31d50SGarrett Wollman.Fl s 18467c31d50SGarrett Wollmanoption was introduced in 18567c31d50SGarrett Wollman.Fx 2.2 , 1861ed0e5d2SBill Fumerolathe 18767c31d50SGarrett Wollman.Fl u 18867c31d50SGarrett Wollmanoption was introduced in 1891ed0e5d2SBill Fumerola.Fx 4.2 , 1901ed0e5d2SBill Fumerolaand the 1911ed0e5d2SBill Fumerola.Fl c 1921ed0e5d2SBill Fumerolaoption was introduced in 193276c4a5dSKris Kennaway.Fx 4.3 . 19467034ac6SJeroen Ruigrok van der Werven.Sh BUGS 19567034ac6SJeroen Ruigrok van der WervenFiles larger than 33488896 octets (65535 blocks) cannot be transferred 19667034ac6SJeroen Ruigrok van der Wervenwithout client and server supporting blocksize negotiation (RFC1783). 19767034ac6SJeroen Ruigrok van der Werven.Pp 19867034ac6SJeroen Ruigrok van der WervenMany tftp clients will not transfer files over 16744448 octets (32767 blocks). 199