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

Dim*_*ima 5 networking linux centos tftp centos6

我正在尝试在 CentOS 6.2 上设置 TFTP 服务器。该/etc/xinet.d/tftp配置文件如下:

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
}
Run Code Online (Sandbox Code Playgroud)

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
Run Code Online (Sandbox Code Playgroud)

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

drw-rw-rw-.   3 root root  4096 Jul 11 03:32 tftpboot
Run Code Online (Sandbox Code Playgroud)

我还看到该tftpboot目录ls -l以绿色背景显示(由)(与其他文件/目录不同)(为什么?据我所知,绿色背景仅用于粘性位)。

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

eww*_*ite 5

你的/etc/xinet.d/tftp配置文件是正确的。

的权限/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
Run Code Online (Sandbox Code Playgroud)