0

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?

2
  • 1
    Does the xinetd get started? Is there anything related to xinetd in the log files?
    – Zoredache
    Oct 21, 2009 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, 2009 at 1:41

4 Answers 4

1

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.

8
  • 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, 2009 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, 2009 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, 2009 at 0:10
  • 1
    If you are considering switching to something else I recommend atftp (freshmeat.net/projects/atftp)
    – Zoredache
    Oct 21, 2009 at 2:14
  • 1
    Do you have SELinux on?
    – MDMarra
    Oct 23, 2009 at 11:24
1

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)

1
  • Do you have basic instructions for installing on red hat / centos?
    – Mike B
    Oct 23, 2009 at 4:00
0

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.

1
0

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.

1
  • 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, 2009 at 3:56

You must log in to answer this question.

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