TFTP and Linux

DevilWAHDevilWAH Member Posts: 2,997 ■■■■■■■■□□
Still getting use to Linux, but decided to set up TFTP on my server.
thought I would use TFTPd-hpa as this is what every one seems to suggest.


my only problem is that it seems you need to create the files first on the server before you can copy a config from a router on to the server.

Is there any way in the config of TFTPd-hpa (or is there a better TFTP server for Linux) that allows the automatic creation of files when they are copied across.

Cheers

Aaron
  • If you can't explain it simply, you don't understand it well enough. Albert Einstein
  • An arrow can only be shot by pulling it backward. So when life is dragging you back with difficulties. It means that its going to launch you into something great. So just focus and keep aiming.

Comments

  • jovan88jovan88 Member Posts: 393
    Yeah its possible - I got it working after heaps of playing around

    these are my tftp settings in /etc/xinetd.d/tftp
    service tftp
    {
    socket_type = dgram
    protocol = udp
    wait = yes
    user = root
    server = /usr/sbin/in.tftpd
    server_args = -c -s /home/Jovan/tftp
    disable = no
    per_source = 11
    cps = 100 2
    flags = IPv4
    }


    and I also punched in, chown nobody tftp and chmod 770 tftp

    Sorry man I'm a total linux noob, let me know how you get on
  • NightShade03NightShade03 Member Posts: 1,383 ■■■■■■■□□□
    jovan88 wrote: »
    Yeah its possible - I got it working after heaps of playing around

    these are my tftp settings in /etc/xinetd.d/tftp
    service tftp
    {
    socket_type = dgram
    protocol = udp
    wait = yes
    user = root
    server = /usr/sbin/in.tftpd
    server_args = -c -s /home/Jovan/tftp
    disable = no
    per_source = 11
    cps = 100 2
    flags = IPv4
    }


    and I also punched in, chown nobody tftp and chmod 770 tftp

    Sorry man I'm a total linux noob, let me know how you get on


    This is correct however it is a different setup then the tftpd-hpa you are using. What distro are you on? In the RHEL/Centos setup you can just do:

    # yum - install tftp

    It will install the server package and the you edit /etc/xinetd.d/tftp to the options set above. The -c passed to the server_args creates the files if they aren't there already. Read

    # man tftpd

    for more info. Don't forget to change the directory permissions as well.
  • CyanicCyanic Member Posts: 289
    You will want to man tftpd as this is for the server. And verify you have -c in the server arguments line on the config as stated above.

    -c Allow new files to be created. By default, tftpd will only allow upload of files that already exist. Files are created with default permissions allowing anyone to read or write them, unless the -p or -U options are specified.
  • NightShade03NightShade03 Member Posts: 1,383 ■■■■■■■□□□
    Cyanic wrote: »
    You will want to man tftpd as this is for the server.

    I fixed my post....sry it's before coffee time icon_wink.gif
  • CyanicCyanic Member Posts: 289
    I fixed my post....sry it's before coffee time icon_wink.gif

    No worries, I make that kind of mistake all the time. Trying to remember all the intricacies for multiple systems is down right mean. icon_twisted.gif
  • DevilWAHDevilWAH Member Posts: 2,997 ■■■■■■■■□□
    Ahh perfect guys :) was just that little -c :)

    Ok time to take to work and get a few old servers so I can get a real nice GNS3 lab up and running.

    All I need to do now is get ASA server working in GNS3 as this is something I really need to learn!!

    I thinking one dell 2600 server for running GNS3 and one for running VMware. and I should be able to lab up some decent setups along with my physical lab stuff. I might even see if work can spare 3 or 4 of them :)
    • If you can't explain it simply, you don't understand it well enough. Albert Einstein
    • An arrow can only be shot by pulling it backward. So when life is dragging you back with difficulties. It means that its going to launch you into something great. So just focus and keep aiming.
Sign In or Register to comment.