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?

Mike B
  • 11,871
  • 42
  • 107
  • 168
  • 1
    Does the xinetd get started? Is there anything related to xinetd in the log files? – Zoredache Oct 21 '09 at 01: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 01:41

4 Answers4

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.

MDMarra
  • 100,734
  • 32
  • 197
  • 329
  • 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 00: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 00:10
  • Thanks Mark. Unfortunately nothing in the logs. I also just tried the command and arguments... **/usr/sbin/in.tftpd -vvvvv -s /tftpboot** and it looks like it's thinking about something... but when I check the ports, its still not listening on 69. I'm a little lost at this point... is there another tftp server I can try? – Mike B Oct 21 '09 at 01:10
  • Do you need to make an iptables rule allowing traffic on port 69? tftpd is the only TFTP server I've ever used, but I'm sure there are others. I just can't comment on them. – MDMarra Oct 21 '09 at 01:16
  • 1
    If you are considering switching to something else I recommend atftp (http://freshmeat.net/projects/atftp/) – Zoredache Oct 21 '09 at 02:14
  • @MarkM - Problem exists even if I disable iptables. @Zoredache - I wasn't able to find install instructions for atftp for Centos 4. – Mike B Oct 23 '09 at 03:54
  • 1
    Do you have SELinux on? – MDMarra Oct 23 '09 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)

Dan Carley
  • 25,617
  • 5
  • 53
  • 70
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.

CosmicQ
  • 123
  • 5
  • Create the file and chmod are as per cisco tftp instructions: http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a008009463e.shtml – CosmicQ Oct 21 '09 at 14:50
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.

wzzrd
  • 10,409
  • 2
  • 35
  • 47
  • 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 03:56