Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
The green background in ls -l --color means that the file or directory is world writable. –  Michael Hampton Jul 12 '12 at 0:32
add comment

2 Answers

up vote 5 down vote accepted

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
share|improve this answer
    
Definitely need +rx for directories. –  Aaron Copley Jul 11 '12 at 21:13
add comment

I've run into this a couple of times.

Verify /etc/xinetd.conf to see if your server is named to allow access to the xinetd daemon and check /etc/host.allow to see if tftp and in.tftpd is allowed on your network.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.