5

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?

1
  • The green background in ls -l --color means that the file or directory is world writable. Jul 12, 2012 at 0:32

3 Answers 3

5

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
2
  • Definitely need +rx for directories. Jul 11, 2012 at 21:13
  • old thread i know - but suspect OP eventually had to mess with selinux settings. if 'setenforce 0' alleviates the issues, there are selinux issues with /tftpboot
    – JustJeff
    Dec 2, 2014 at 16:59
0

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.

0

We went through and did all of the above (have run tftp many times) and could not get it to work on CentOS7. Write Permisson problem no matter what we did. Finally took @justjeff suggestion and "setenforce 0" and it worked.

kernel has all the latest patches.

Issue with selinux again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .