ATFTPD(8) ATFTPD(8)
NAME
名称
atftpd - Trivial File Transfer Protocol Server.
简单文件传输协议服务器
SYNOPSIS
语法
atftpd [options] directory
atftpd [选项] 目录
DESCRIPTION
描述
atftpd is a TFTP (RFC1350) server. By default it is started by inetd on
most sytems, but may run as a stand alone daemon. This server is multi-
threaded and supports all options described in RFC2347 (option exten‐
sion), RFC2348 (blksize), RFC2349 (tsize and timeout) and RFC2090 (mul‐
ticast option). It also supports mtftp as defined in the PXE specifica‐
tion.
atftpd 是一个 TFPT (RFC1350) 服务器。在大多数系统中默认由 inetd 进程启动,
但是也可以作为独立的守护进程运行。本服务器支持多线程,支持由RFC2347(扩展选项),
RFC(blksize),RFC2349(tsize and timeout)以及RFC2090(组播选项)中描述的所有
选项。同时支持PXE规范中对mtftp的定义。
OPTIONS
选项
This program supports both the usual GNU command line syntax, with long
options starting with two dashes (’-’) as well as short options. A
description of the options is included below.
本程序支持通用GNU命令行语法,包括以两个('-')开始的长选项和短选项。以下是选项
的详细描述。
-t, --tftpd-timeout <value>
Number of seconds of inactivity before the server exits. This
value has meaning only when the server is started by inetd. In
daemon mode, the server never exits. Default is 300 seconds.
服务器退出服务之前的不活动时间。该参数仅对由inetd进程开启的服务器有
效。在独立启动的服务器永远不会超时退出。默认值为300秒。
-r, --retry-timeout <value>
How many seconds to wait for a reply before retransmitting a
packet. Default is 5 seconds. This can be overridden by the TFTP
client with the ’timeout’ option.
重传超时时间,默认5秒。如果TFTP客户端使用了“timout”选项,该选项将
被忽略。
-m, --maxthread <value>
Maximum number of concurrent threads allowed. Default is 100.
允许的并发线程的数量,默认为100。
-v, --verbose[=value]
Increase or set the logging level. No arguments will increase by
one the current value. Default is LOG_NOTICE, see syslog(3) for
log level. Valid value range from 0 (LOG_EMERG) to 7
(LOG_DEBUG).
增加或者设置日志级别。不带参数将在当前值基础上加1。默认为LOG_NOTICE
参考日志级别syslog(3)。有效取值范围从 0 (LOG_EMERG) 到 7 (LOG_DEBUG)。
--trace
When verbose level is set to 7, this will output debug informa‐
tion for each packet sent or received from the network.
当 verbose 级别设定在7,将输出从网络接收和发送的每一个包的调试信息。
--no-timeout
disable ’timeout’ from RFC2349. This will prevent the server
from acknowledging the ’timeout’ option requested by the client.
禁止RFC2349中定义的“timeout”选项。该参数将使服务器端忽略客户端的
“timeout”选项。
--no-tsize
disable ’tsize’ from RFC2349. This will prevent the server from
acknowledging the ’tsize’ option requested by the client.
禁止RFC2349中定义的“tsize”选项。该参数将使服务器端忽略客户端的
“tsize”选项。
--no-blksize
disable ’blksize’ from RFC2348. This will prevent the server
from acknowledging the ’blksize’ request by the client.
禁止RFC2348中定义的“blksize”选项。该参数将使服务器端忽略客户端的
“blksize”选项。
--no-multicast
disable ’multicast’ from RFC2090. This will prevent the server
from acknowledging the ’multicast’ request by the client.
禁止RFC2090中定义的“multicast”选项。该参数将使服务器端忽略客户端的
“multicast”选项。
--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 ran in daemon mode,
/dev/stdout or /dev/stderr can be used.
记录日志信息到指定文件。‘nobody’(或者任意习惯使用该服务器的用户)
应该拥有该指定文件的访问权限。假定文件是/var/log/atftpd.log,简单
操作如下:首先“touch /var/log/atftpd.log”然后“chown nobody.nogroup
/var/log/atftpd.log”。当服务器运行在daemon模式下时 /dev/stdout 或者
/dev/stderr 可以被使用。
--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.
将服务器的PID写入指定文件。这在自动启动和停止一个或者多个服务器实例
时将非常有用。
--daemon
Run as a daemon. Do not use this option if atftpd is started by
inetd.
服务器作为独立的守护程序运行。如果服务器有 inetd 进程启动则不使用
本选项。
--no-fork
When --daemon is specified, this option will prevent the server
from forking to background. It is useful for debugging purpose
or specialized usage.
当 --daemon 选项被设定,该选项将禁止服务器被切换到后台运行。这在调试
或者某些特殊用法时将非常有用。
--user <user[.group]>
By default, the server change identity to the user nobody and
group nogroup. Specify an alternate user.group with this option.
服务器默认设定用户身份为 nobody.nogroup。使用该参数指定用户身份为
user.group
--group <group>
Alternate way of specifying the group. If group is specified
with --user and --group, the last option will be used.
设定用户组。
--port <number>
Specify the port on which atftpd listens. Useful when --daemon
is specified. Default is standard tftp port as determined by
getservbyname(3).
指定atftpd侦听的端口。当指定--daemon参数时有用。默认使用标准tfpt端
口。
--bind-address <IP address>
Specify the IP address which atftpd binds to. Useful when --dae‐
mon is specified. Default is to bind to all interfaces. Only one
address can be specified, the server can only listen to one or
all interfaces.
设定atftpd进程绑定在指定IP地址上。当指定--daemon参数时有用。默认绑定
在所有接口上。参数只能指定一个IP地址,服务器只能侦听一个接口或者所有
接口。
--mcast-ttl
Specify the TTL to be used for multicast datagram. By default a
value of 1 is used. Note that TTL has a special meaning in mul‐
ticast as it is used to determine the scope of the packets. The
value of 1 means the packets don’t leave the local network, see
ip(4). Scope may also be determine by the address as described
RFC2365.
指定用于组播报文的TTL值。默认值为1。注意这个TTL对于决定组播包转播
范围有特别意义。默认值为1,意味着包不能留在本地网络中,详细请查阅
ip(4)。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.
指定用于组播发送的IP地址范围。格式字串包含取值范围的列表:
“239.255.0.0-31,128-132,200”。默认值为“239.255.0.0-255”。
这个地址段是RFC2365中建议在本地范围使用的。
--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".
指定UDP端口用于组播传送。格式字串应该包含取值范围的列表:
“1758-2000,8000-9000”。默认端口为“1758”。
--pcre <file>
Specify a pattern/replacement file to use. This allow to replace
requested file name based on Perl Compatible Regular Expression.
See README.PCRE.
指定一个 pattern/replacement 文件。允许使用基于 兼容 Perl 表达式
规则的文件名替换被请求的文件。
--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.
测试一个 pattern/replacement 文件。当使用了这个选项,服务器将不会
像平常一样启动,除非从stdin和printout设备上读取了文件名。
--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服务器线程。详见
PXE 规格说明书中关于mtftp的相关细节。在发布的源码中提供了一个示例
文件。
--mtftp-port <port>
Port the mtftp server shall listen to for incomming request.
指定mtftp服务器应该侦听的端口。
--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-multi‐
cast transfer.
在某些特殊类型的网络中(比如有负载均衡设备或者地址转换设备的网络),
需要禁止源端口检测功能,因为这些端口已经被转换过。如果要开启此功能
必须了解现有的应用和需求。明白这个选项违反了RFC1350。这个功能仅影响
非组播报文的转发。
--mcast-switch-client
This option allow 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 field MC (master client) set to false and send
an OACK to the next multicast client with MC set to true. With‐
out this option, the server will retry the current master client
up to 5 times and then mark it done, proceding with the next
one.
这个选项允许服务器在当前客户端超时后马上处理下一个组播客户端的请求。
当当前主客户端发送确认报文(ACK)给服务器失败后,服务器会发送MC域
设置为“false”的的(OACK)报文给主客户端,同时发送MC域设置为“true”
的(OACK)报文给下一个组播客户端。如果没有使用该选项,服务器将与主
客户端之间重试5次,然后处理下一个客户端请求。
-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 direc‐
tory. If not specified, the directory defaults to /tftpboot.
Since atftpd run as the nobody user, the permission of the
directory must be set properly to allow file reading and writ‐
ing.
TFTP 服务器使用的根目录。所有TFTP客户端请求的文件必须存放在这个目录
下。如果没有指定,默认目录名为 /tfptboot。当atftpd运行在nobody用户
级时,应使这个目录下的文件设定合适的权限以运行文件读和写操作。
STATS
运行状态
Starting with release 0.2, the server collects some statistics. Cur‐
rently 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.
从0.2发布版本开始,服务器会收集一些统计信息。当前服务器会计算系统负载,连接
时间,已经发送和接收的文件数量这样一些线性统计信息。如果需要在日志中查看这些
信息,需要设定 --verbose=6(LOG_NOTICE)或者更高。
SECURITY
安全
TFTP by itself has no provision for security. There is no user authen‐
tication and TFTP clients get access to all files within the specified
root directory for which the server has permission.
TFTP 协议本身不提供安全特性。服务器端没有用户验证机制,TFTP客户端可以在指定
的根目录下存取所有文件。
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.
通过使用 Atftp libwrap 能获得一定级别的安全特性。在 /etc/hosts.allow 和
/etc/hosts.deny 中添加适当的条目能限制对信任主机的访问。在这些文件中使用的
守护进程的名字是 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.
Atftpd 服务器提供一种使用新的基于 兼容 Perl 表达式规则的文件名动态替换被请求
文件名的方法。Pattern/replacement 对从指定的文件中读取。当服务器接收到一个读
请求时,首先尝试按照收到的文件名打开文件。如果失败,则按照 pattern 文件中的内
容搜索 replacement 信息,如果也失败返回读错误给客户端。这个功能只能在读操作时
可用。当往服务器上写文件时,这种替换完全被忽略。
MTFTP
The mtftp name refer to multicasrt tftp as define by the PXE specifica‐
tion. 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.
关于mtftp名请参考PXE详细说明书中有关组播tftp的相关定义。参考文档pxespec.txt。
注意,这与RFC2090不一样。PXE 服从 mtftp 启动应用,而不是RFC2090。
SEE ALSO
inetd(8),hosts_access(5),libpcre(7), RFC1350, RFC2090, RFC2347,
RFC2348, RFC2349 and pxespec.pdf.
同时,可以参考inetd(8),hosts_access(5),libpcre(7), RFC1350, RFC2090,
RFC2347, RFC2348, RFC2349 and pxespec.pdf.
AUTHOR
作者
This manual page was written by Remi Lefebvre <remi@debian.org> and
Jean-Pierre Lefebvre <helix@step.polymtl.ca>.
本文档由 Remi Lefebvre <remi@debian.org> 和 Jean-Pierre Lefebvre
<helix@step.polymtl.ca> 撰写。
December 27, 2000 ATFTPD(8)
2000年12月27日