Find the answer to your Linux question:
Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    [SOLVED] [Resolved] Tftp

    I have a problem with a tftp server that I just setup. This server is going to be used to provision some little Linksys PAP2T units automatically via DHCP option 66.

    I already created the file that the device will be looking for on the server and confirmed that I can get to it from my XP box. On XP I can use the command prompt and run:
    c:\>tftp get init.cfg
    C:\Documents and Settings\Ron>tftp get init.cfg
    Transfer successful: 126 bytes in 1 second, 126 bytes/s
    On the Syslog of the tftp server I see the following lines show up:
    Apr 22 17:14:40 ubuntu tftpd[5441]: tftpd: trying to get file: init.cfg
    Apr 22 17:14:40 ubuntu tftpd[5441]: tftpf: serving file from /var/www/tftpboot
    So this works just fine, and I confirmed it by opening the file that I tftp'd over and all the data is in it.

    However when I plug in my PAP2 and wait for it to checkout option 66 to download the file it fails. On the server syslog I see this:
    Apr 22 17:14:40 ubuntu tftpd[5206]: tftpd: trying to get file: /init.cfg
    The only thing that I notice that is different is that the file name has a "/" before it when the device tries to do it. I also used wireshark to trace what the responses were and this is what the server sends back:
    3969	3581.539242	TFTP	Error Code, Code: Access violation, Message: Access violation\000
    I'm guessing the server needs to be told somehow to trip off any preceding "/" but I don't know how to do this if it is possible. If it was a simple matter of logging into the device and changing the name of the file it looked for then it would be pointless to set up an automated system as it would not save me any time. The PAP2s come with /init.cfg as the file that it's looking for.

    I assume that now what this is trying to do is serve the init.cfg from the / (root) directly and it doesn't exist there. Is there any way to strip the / out of the requested file name, or am I running this wrong?

    Here is my tftpd configuration with xinetd located in /etc/xinetd.d/tftp
    service tftp
    protocol = udp
    port = 69
    socket_type = dgram
    wait = yes
    user = nobody
    server = /usr/sbin/in.tftpd
    server_args = /var/www/tftpboot
    disable = no

    I fixed this by getting rid of tftpd and using atftpd, not it looks to be working fine
    Last edited by synapseattack; 04-22-2009 at 09:56 PM. Reason: Fixed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts