1*bd1f8aebSAndroid Build Coastguard Worker<refentry id="tftpd"> 2*bd1f8aebSAndroid Build Coastguard Worker 3*bd1f8aebSAndroid Build Coastguard Worker<refmeta> 4*bd1f8aebSAndroid Build Coastguard Worker<refentrytitle>tftpd</refentrytitle> 5*bd1f8aebSAndroid Build Coastguard Worker<manvolnum>8</manvolnum> 6*bd1f8aebSAndroid Build Coastguard Worker<refmiscinfo>iputils-&snapshot;</refmiscinfo> 7*bd1f8aebSAndroid Build Coastguard Worker</refmeta> 8*bd1f8aebSAndroid Build Coastguard Worker 9*bd1f8aebSAndroid Build Coastguard Worker<refnamediv> 10*bd1f8aebSAndroid Build Coastguard Worker<refname>tftpd</refname> 11*bd1f8aebSAndroid Build Coastguard Worker<refpurpose>Trivial File Transfer Protocol server</refpurpose> 12*bd1f8aebSAndroid Build Coastguard Worker</refnamediv> 13*bd1f8aebSAndroid Build Coastguard Worker 14*bd1f8aebSAndroid Build Coastguard Worker<refsynopsisdiv> 15*bd1f8aebSAndroid Build Coastguard Worker<cmdsynopsis> 16*bd1f8aebSAndroid Build Coastguard Worker<command>tftpd</command> 17*bd1f8aebSAndroid Build Coastguard Worker<arg choice="req"><replaceable/directory/</arg> 18*bd1f8aebSAndroid Build Coastguard Worker</cmdsynopsis> 19*bd1f8aebSAndroid Build Coastguard Worker</refsynopsisdiv> 20*bd1f8aebSAndroid Build Coastguard Worker 21*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>DESCRIPTION</title> 22*bd1f8aebSAndroid Build Coastguard Worker<para> 23*bd1f8aebSAndroid Build Coastguard Worker<command/tftpd/ is a server which supports the DARPA 24*bd1f8aebSAndroid Build Coastguard WorkerTrivial File Transfer Protocol 25*bd1f8aebSAndroid Build Coastguard Worker(<ulink url="http://tools.ietf.org/rfc/rfc1350.txt">RFC1350</ulink>). 26*bd1f8aebSAndroid Build Coastguard WorkerThe TFTP server is started 27*bd1f8aebSAndroid Build Coastguard Workerby <citerefentry><refentrytitle/inetd/<manvolnum/8/</citerefentry>. 28*bd1f8aebSAndroid Build Coastguard Worker</para> 29*bd1f8aebSAndroid Build Coastguard Worker 30*bd1f8aebSAndroid Build Coastguard Worker<para> 31*bd1f8aebSAndroid Build Coastguard Worker<replaceable/directory/ is required argument; if it is not given 32*bd1f8aebSAndroid Build Coastguard Worker<command/tftpd/ aborts. This path is prepended to any file name requested 33*bd1f8aebSAndroid Build Coastguard Workervia TFTP protocol, effectively chrooting <command/tftpd/ to this directory. 34*bd1f8aebSAndroid Build Coastguard WorkerFile names are validated not to escape out of this directory, however 35*bd1f8aebSAndroid Build Coastguard Workeradministrator may configure such escape using symbolic links. 36*bd1f8aebSAndroid Build Coastguard Worker</para> 37*bd1f8aebSAndroid Build Coastguard Worker 38*bd1f8aebSAndroid Build Coastguard Worker<para> 39*bd1f8aebSAndroid Build Coastguard WorkerIt is in difference of variants of <command/tftpd/ usually distributed 40*bd1f8aebSAndroid Build Coastguard Workerwith unix-like systems, which take a list of directories and match 41*bd1f8aebSAndroid Build Coastguard Workerfile names to start from one of given prefixes or to some random 42*bd1f8aebSAndroid Build Coastguard Workerdefault, when no arguments were given. There are two reasons not to 43*bd1f8aebSAndroid Build Coastguard Workerbehave in this way: first, it is inconvenient, clients are not expected 44*bd1f8aebSAndroid Build Coastguard Workerto know something about layout of filesystem on server host. 45*bd1f8aebSAndroid Build Coastguard WorkerAnd second, TFTP protocol is not a tool for browsing of server's filesystem, 46*bd1f8aebSAndroid Build Coastguard Workerit is just an agent allowing to boot dumb clients. 47*bd1f8aebSAndroid Build Coastguard Worker</para> 48*bd1f8aebSAndroid Build Coastguard Worker 49*bd1f8aebSAndroid Build Coastguard Worker<para> 50*bd1f8aebSAndroid Build Coastguard WorkerIn the case when <command/tftpd/ is used together with 51*bd1f8aebSAndroid Build Coastguard Worker<link linkend="rarpd"> 52*bd1f8aebSAndroid Build Coastguard Worker<citerefentry><refentrytitle/rarpd/<manvolnum/8/</citerefentry></link>, 53*bd1f8aebSAndroid Build Coastguard Workertftp directories in these services should coincide and it is expected 54*bd1f8aebSAndroid Build Coastguard Workerthat each client booted via TFTP has boot image corresponding 55*bd1f8aebSAndroid Build Coastguard Workerits IP address with an architecture suffix following Sun Microsystems 56*bd1f8aebSAndroid Build Coastguard Workerconventions. See 57*bd1f8aebSAndroid Build Coastguard Worker<link linkend="rarpd"> 58*bd1f8aebSAndroid Build Coastguard Worker<citerefentry><refentrytitle/rarpd/<manvolnum/8/</citerefentry></link> 59*bd1f8aebSAndroid Build Coastguard Workerfor more details. 60*bd1f8aebSAndroid Build Coastguard Worker</para> 61*bd1f8aebSAndroid Build Coastguard Worker</refsect1> 62*bd1f8aebSAndroid Build Coastguard Worker 63*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>SECURITY</title> 64*bd1f8aebSAndroid Build Coastguard Worker<para> 65*bd1f8aebSAndroid Build Coastguard WorkerTFTP protocol does not provide any authentication. 66*bd1f8aebSAndroid Build Coastguard WorkerDue to this capital flaw <command/tftpd/ is not able to restrict 67*bd1f8aebSAndroid Build Coastguard Workeraccess to files and will allow only publically readable 68*bd1f8aebSAndroid Build Coastguard Workerfiles to be accessed. Files may be written only if they already 69*bd1f8aebSAndroid Build Coastguard Workerexist and are publically writable. 70*bd1f8aebSAndroid Build Coastguard Worker</para> 71*bd1f8aebSAndroid Build Coastguard Worker 72*bd1f8aebSAndroid Build Coastguard Worker<para> 73*bd1f8aebSAndroid Build Coastguard WorkerImpact is evident, directory exported via TFTP <emphasis/must not/ 74*bd1f8aebSAndroid Build Coastguard Workercontain sensitive information of any kind, everyone is allowed 75*bd1f8aebSAndroid Build Coastguard Workerto read it as soon as a client is allowed. Boot images do not contain 76*bd1f8aebSAndroid Build Coastguard Workersuch information as rule, however you should think twice before 77*bd1f8aebSAndroid Build Coastguard Workerpublishing f.e. Cisco IOS config files via TFTP, they contain 78*bd1f8aebSAndroid Build Coastguard Worker<emphasis/unencrypted/ passwords and may contain some information 79*bd1f8aebSAndroid Build Coastguard Workerabout the network, which you were not going to make public. 80*bd1f8aebSAndroid Build Coastguard Worker</para> 81*bd1f8aebSAndroid Build Coastguard Worker 82*bd1f8aebSAndroid Build Coastguard Worker<para> 83*bd1f8aebSAndroid Build Coastguard WorkerThe <command/tftpd/ server should be executed by <command/inetd/ 84*bd1f8aebSAndroid Build Coastguard Workerwith dropped root privileges, namely with a user ID giving minimal 85*bd1f8aebSAndroid Build Coastguard Workeraccess to files published in tftp directory. If it is executed 86*bd1f8aebSAndroid Build Coastguard Workeras superuser occasionally, <command/tftpd/ drops its UID and GID 87*bd1f8aebSAndroid Build Coastguard Workerto 65534, which is most likely not the thing which you expect. 88*bd1f8aebSAndroid Build Coastguard WorkerHowever, this is not very essential; remember, only files accessible 89*bd1f8aebSAndroid Build Coastguard Workerfor everyone can be read or written via TFTP. 90*bd1f8aebSAndroid Build Coastguard Worker</para> 91*bd1f8aebSAndroid Build Coastguard Worker 92*bd1f8aebSAndroid Build Coastguard Worker</refsect1> 93*bd1f8aebSAndroid Build Coastguard Worker 94*bd1f8aebSAndroid Build Coastguard Worker 95*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>SEE ALSO</title> 96*bd1f8aebSAndroid Build Coastguard Worker<para> 97*bd1f8aebSAndroid Build Coastguard Worker<link linkend="rarpd"> 98*bd1f8aebSAndroid Build Coastguard Worker<citerefentry><refentrytitle/rarpd/<manvolnum/8/</citerefentry></link>, 99*bd1f8aebSAndroid Build Coastguard Worker<citerefentry><refentrytitle/tftp/<manvolnum/1/</citerefentry>, 100*bd1f8aebSAndroid Build Coastguard Worker<citerefentry><refentrytitle/inetd/<manvolnum/8/</citerefentry>. 101*bd1f8aebSAndroid Build Coastguard Worker</para> 102*bd1f8aebSAndroid Build Coastguard Worker</refsect1> 103*bd1f8aebSAndroid Build Coastguard Worker 104*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>HISTORY</title> 105*bd1f8aebSAndroid Build Coastguard Worker<para> 106*bd1f8aebSAndroid Build Coastguard WorkerThe <command/tftpd/ command appeared in 4.2BSD. The source in iputils 107*bd1f8aebSAndroid Build Coastguard Workeris cleaned up both syntactically (ANSIized) and semantically (UDP socket IO). 108*bd1f8aebSAndroid Build Coastguard Worker</para> 109*bd1f8aebSAndroid Build Coastguard Worker<para> 110*bd1f8aebSAndroid Build Coastguard WorkerIt is distributed with iputils mostly as good demo of an interesting feature 111*bd1f8aebSAndroid Build Coastguard Worker(<constant/MSG_CONFIRM/) allowing to boot long images by dumb clients 112*bd1f8aebSAndroid Build Coastguard Workernot answering ARP requests until they are finally booted. 113*bd1f8aebSAndroid Build Coastguard WorkerHowever, this is full functional and can be used in production. 114*bd1f8aebSAndroid Build Coastguard Worker</para> 115*bd1f8aebSAndroid Build Coastguard Worker</refsect1> 116*bd1f8aebSAndroid Build Coastguard Worker 117*bd1f8aebSAndroid Build Coastguard Worker 118*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>AVAILABILITY</title> 119*bd1f8aebSAndroid Build Coastguard Worker<para> 120*bd1f8aebSAndroid Build Coastguard Worker<command/tftpd/ is part of <filename/iputils/ package 121*bd1f8aebSAndroid Build Coastguard Workerand the latest versions are available in source form at 122*bd1f8aebSAndroid Build Coastguard Worker<ulink url="http://www.skbuff.net/iputils/iputils-current.tar.bz2"> 123*bd1f8aebSAndroid Build Coastguard Workerhttp://www.skbuff.net/iputils/iputils-current.tar.bz2</ulink>. 124*bd1f8aebSAndroid Build Coastguard Worker</para> 125*bd1f8aebSAndroid Build Coastguard Worker</refsect1> 126*bd1f8aebSAndroid Build Coastguard Worker 127*bd1f8aebSAndroid Build Coastguard Worker 128*bd1f8aebSAndroid Build Coastguard Worker<![IGNORE[ 129*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>COPYING</title> 130*bd1f8aebSAndroid Build Coastguard Worker<para> 131*bd1f8aebSAndroid Build Coastguard Worker<literallayout> 132*bd1f8aebSAndroid Build Coastguard WorkerThis documentation is free software; you can redistribute 133*bd1f8aebSAndroid Build Coastguard Workerit and/or modify it under the terms of the GNU General Public 134*bd1f8aebSAndroid Build Coastguard WorkerLicense Version 2. 135*bd1f8aebSAndroid Build Coastguard Worker 136*bd1f8aebSAndroid Build Coastguard WorkerThis program is distributed in the hope that it will be 137*bd1f8aebSAndroid Build Coastguard Workeruseful, but WITHOUT ANY WARRANTY; without even the implied 138*bd1f8aebSAndroid Build Coastguard Workerwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 139*bd1f8aebSAndroid Build Coastguard WorkerSee the GNU General Public License for more details. 140*bd1f8aebSAndroid Build Coastguard Worker 141*bd1f8aebSAndroid Build Coastguard WorkerFor more details see the file COPYING in the source 142*bd1f8aebSAndroid Build Coastguard Workerdistribution of Linux kernel of version 2.4. 143*bd1f8aebSAndroid Build Coastguard Worker</literallayout> 144*bd1f8aebSAndroid Build Coastguard Worker</literallayout> 145*bd1f8aebSAndroid Build Coastguard Worker</para> 146*bd1f8aebSAndroid Build Coastguard Worker</refsect1> 147*bd1f8aebSAndroid Build Coastguard Worker]]> 148*bd1f8aebSAndroid Build Coastguard Worker 149*bd1f8aebSAndroid Build Coastguard Worker 150*bd1f8aebSAndroid Build Coastguard Worker 151*bd1f8aebSAndroid Build Coastguard Worker</refentry> 152