如何在CentOS 6.2上制作TFTP服务器

我试图在CentOS 6.2上设置TFTP服务器。 /etc/xinet.d/tftpconfiguration文件如下:

 service tftp { disable = no socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot -vvv per_source = 11 cps = 100 2 flags = IPv4 } 

selinux和防火墙被禁用。 /etc/hosts.allow/etc/hosts.deny文件是空的。 当我试图从TFTP服务器获取文件时,文件传输总是失败,我在/var/log/messages看到以下错误

 Jul 11 03:16:53 localhost xinetd[4155]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in. Jul 11 03:16:53 localhost xinetd[4155]: Started working: 1 available service Jul 11 03:17:00 localhost xinetd[4155]: START: tftp pid=4157 from=192.168.10.3 Jul 11 03:17:00 localhost in.tftpd[4158]: RRQ from 192.168.10.3 filename 1 Jul 11 03:17:00 localhost in.tftpd[4158]: sending NAK (0, Permission denied) to 192.168.10.3 Jul 11 03:17:01 localhost in.tftpd[4159]: RRQ from 192.168.10.3 filename 1 Jul 11 03:17:01 localhost in.tftpd[4159]: sending NAK (0, Permission denied) to 192.168.10.3 Jul 11 03:17:03 localhost in.tftpd[4160]: RRQ from 192.168.10.3 filename 1 

tftpboot目录权限是( ls -l命令的输出):

 drw-rw-rw-. 3 root root 4096 Jul 11 03:32 tftpboot 

我也看到tftpboot目录显示(由ls -l )与绿色背景(不像其他文件/目录)(为什么?因为我知道绿色的背景只是粘性位)。

我做错了什么? 我如何使TFTP服务器工作?

你的/etc/xinet.d/tftpconfiguration文件是正确的。

/tftpboot的权限应该是755或drwxr-xr-x

确保chkconfig –list在xinetd下显示tftp已启用。

 xinetd based services: chargen-dgram: off chargen-stream: off daytime-dgram: off . . rsync: on tcpmux-server: off tftp: on 

我已经遇到过几次了。

validation/etc/xinetd.conf以查看您的服务器是否被命名为允许访问xinetd守护进程,并检查/etc/host.allow以查看networking上是否允许tftpin.tftpd