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 KNOW I'm missing something simple here. I'm trying to install/run a TFTP server on my centos 4.8 server. I've done the following:

1) Authenticated to the shell as root.

2) Installed tftp-server: yum install tftp-server (xinetd is already installed btw)

3) Edit /etc/xinetd.d/tftp and set disable = no

# default: off
# description: The tftp server serves files using the trivial file transfer \
#       protocol.  The tftp protocol is often used to boot diskless \
#       workstations, download configuration files to network-aware printers, \
#       and to start the installation process for some operating systems.

service tftp
{
            disable                 = no
            socket_type             = dgram
            protocol                = udp
            wait                    = yes
            user                    = root
            server                  = /usr/sbin/in.tftpd
            server_args             = -s /tftpboot
            per_source              = 11
            cps                     = 100 2
            flags                   = IPv4
 }

4) Restart xinetd: service xinetd restart

5) Set directory permissions: chmod 777 /tftpboot

6) Make sure the service starts on reboot: chkconfig tftp on

7) Make sure xinetd starts on reboot: chkconfig xinetd on

The tftp-server doesn't seem to start though... not sure why. I don't get any errors but I don't see it listening on port 69 in local netstat results and I can't connect to from tftp client.

What am I missing here?

UPDATE Thanks for all your help guys. I think I'm starting to see the root cause here -- xinetd doesn't appear to be running or started.

[root@server ~]# service xinetd restart
[root@server ~]#

I've removed tftp-server and then removed xinetd... reinstalled them both with yum (xinetd first) but I'm still getting the same error. Is there a log I can examine for xinet?

share|improve this question
1  
Does the xinetd get started? Is there anything related to xinetd in the log files? –  Zoredache Oct 21 '09 at 1:31
    
to see if xinetd is starting on boot you can run chkconfig xinetd --list. If it is off on boot you can use chkconfig xinetd --level 345 on –  MDMarra Nov 14 '09 at 1:41

4 Answers 4

up vote 1 down vote accepted

In server args you have -s /tftpboot, but in your post you said the dir you're using is /tftpserver. The -s and path means the directory that you are using as the TFTP root directory. Change this to the path or the directory you want to use.

If /tftpboot doesn't exist you'll see an error in /var/log/messages and the daemon won't actually start.

share|improve this answer
    
Thanks mark. That was a typo in my original post. 'Doh! I editted my original post to correct that. On a side note, I don't see any errors on /var/log/messages. –  Mike B Oct 20 '09 at 23:59
1  
Add -vvvvv to the end of server args, save the config file and do service xinetd restart. This will turn on max verbosity for tftpd logging. Check /var/log/messages after, maybe you'll see something else in the log. –  MDMarra Oct 21 '09 at 0:08
    
Those are 5 "v"s in a row. I just realized it's hard to read with this font after I clicked submit. –  MDMarra Oct 21 '09 at 0:10
1  
If you are considering switching to something else I recommend atftp (freshmeat.net/projects/atftp) –  Zoredache Oct 21 '09 at 2:14
1  
Do you have SELinux on? –  MDMarra Oct 23 '09 at 11:24

Have you created the file first? In my cisco backups I don't chmod 777 the whole directory, I create the file first and then chmod 666 the file. Then I can write to it.

Try this:

touch testfile.txt

chmod 666 testfile.txt

Then transfer the file to the tftp server. This is assuming that you are trying to put file on to the tftp server.

share|improve this answer
    
Create the file and chmod are as per cisco tftp instructions: cisco.com/en/US/tech/tk648/tk362/… –  CosmicQ Oct 21 '09 at 14:50

I would ditch it in favour of atftp personally.

It's much simpler to configure, better featured, performs proper logging and doesn't rely on inetd.

(Includes: nod to Zoredcache's comment)

share|improve this answer
    
Do you have basic instructions for installing on red hat / centos? –  Mike B Oct 23 '09 at 4:00

You wouldn't see tftp listening on port 69, you'd see xinetd. I'm not expecting that to fix your problem, but I'm noting it anyway, for history's sake ;-)

Anyway, some things to check

  • is SELinux enabled?
  • if xinetd is listening on port 69: is iptables running?

Oh, and for the love of the gods: don't chmod 777 or 666 stuff that is as important as /tftpboot.

share|improve this answer
    
Thanks wzzrd. SELinux is disabled. I think you're on to something though... when I tried to restart xinetd I don't get a status or error... just returns me to the prompt. –  Mike B Oct 23 '09 at 3:56

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.