Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I can't get tftp to work on my machine running Scientific Linux 6.1:

[root@bugs ~]# ls /tftpboot/
default  example.txt  MX075000.002_107  MX075100.002_025  MX076000.002  MX076200.002      MX0779900.002
[root@bugs ~]# tftp localhost
tftp> status
Connected to localhost.
Mode: netascii Verbose: off Tracing: off Literal: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp> get example.txt
Transfer timed out.

This is the tftp configuration:

[claudiu@bugs claudiu]$ cat /etc/xinetd.d/tftp
service tftp
{
    disable = no
    socket_type     = dgram
    protocol        = udp
    wait            = yes
    user            = root
    server          = /usr/sbin/in.tftpd
    server_args     = -c -s /tftpboot -v -v -v
    per_source      = 11
    cps         = 100 2
    flags           = IPv4
}

xinetd is up and running:

[claudiu@bugs claudiu]$ sudo service xinetd status
xinetd (pid  23864) is running...

Tftp seems to be turned on and port 69 is open:

[claudiu@bugs claudiu]$ chkconfig | grep tftp
    tftp:           on
[claudiu@bugs claudiu]$ sudo nmap -sU localhost | grep 69
69/udp   open|filtered tftp

Also, the permissions seem to be set right:

[claudiu@bugs claudiu]$ ls -l / | grep ftp
drwxrwxrwx.   2 root    root     4096 Jan  5 15:48 tftpboot
[claudiu@bugs claudiu]$ cd /tftpboot/
[claudiu@bugs tftpboot]$ ls -l example.txt
-rwxrwxrwx. 1 root root 0 Jan  4 15:38 /tftpboot/example.txt

If anybody has any idea what could go wrong, I could use some help...

share|improve this question
    
Note that chkconfig does not manage [x]inetd; rather, it controls the stand-alone tftp daemon. If you have both active, there is a very high chance of conflicts. –  grawity Jan 5 '12 at 14:07
    
Thanks, but I don't think there's any conflicts in this case...I tried turning chkconfig off and xinetd on and vice-versa but it's still not working... –  Claudiu Jan 5 '12 at 14:15
    
How about your selinux configuration? –  kamae Feb 14 '12 at 14:52
    
@kamae Yes, it seems that was it. I solved this problem some time ago, but forgot to close the question. I tried to configure selinux to allow tftp, but I needed the service urgently, so I finally disabled selinux. –  Claudiu Feb 14 '12 at 19:03

3 Answers 3

up vote 3 down vote accepted

It seems that SELinux was causing the trouble. I didn't manage to make tftp work with it, so I fully disabled SELinux. I know it's not recommended, but if anybody else needs to know how to do this, here it is: you need to edit the /etc/selinux/config file and change the line containing "SELINUX=" to:

SELINUX=disabled

A system reboot is mandatory. Without it, the changes won't take effect.

share|improve this answer
echo 0 >/selinux/enforce

This will put SELinux in permissive mode, however a reboot will clear this.

cat /selinux/enforce

This would verify that it is in permissive mode.

This way you do not have to reboot the machine. Just make sure SELINUX=disabled in /etc/selinux/config so it survives a reboot.

share|improve this answer

Check that ICMP is not prohibited in iptables. It solved my problems.

By the way, SELinux does not have to be disabled to make it work.

share|improve this answer

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.