Linux – How to make working TFTP server on CentOS 6.2

centoscentos6linuxnetworkingtftp

I'm trying to setup TFTP server on CentOS 6.2.
The /etc/xinet.d/tftp configuration file is the following:

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
}

The selinux and firewall are disabled.
The /etc/hosts.allow and /etc/hosts.deny files are empty.
When I'm trying to get a file from the TFTP server, the file transfer always failed and I see the following errors into /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

The tftpboot directory permissions are (output of the ls -l command):

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

I also see that the tftpboot directory is shown (by ls -l) with green background (unlike other files/directories) (Why? As I know the green background is for sticky bit only).

What I did wrong? How can I make TFTP server working?

Best Answer

Your /etc/xinet.d/tftp configuration file is correct.

The permissions of /tftpboot should be 755 or drwxr-xr-x.

Make sure chkconfig --list shows tftp enabled under xinetd.

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