tftp configs... ?

ME dugan at passwall.com
Thu May 17 16:51:48 PDT 2001


On Thu, 17 May 2001, Dave Cooper wrote:
> I have used tftp successfully with older RH installs... This is the first
> time I've had a problem..
> xinetd looks ok, ... ???
> 
> I am trying to store a bunch of router cfg's for backup...
> 
> Long term goal, cron runs expect script weekly, backs up all routers... :)

Where you see tftpd called for service, does tftpd have a directory
arguement like /boot or something other than /tftpboot ? (Make sure you
are working in the same directory that tftpd is servicing.)

If so, it (tftpd) may be looking for /boot/tftpboot instead of /tftpboot
or a /tftpboot within the directory path specified to tftpd at its
startup.

> Current errors:
> 
> Remote (Cisco )Router says:
> {
> TFTP connection fail(-1).
> 
> file tftp:/tftpboot/temp.cfg cannot be opened for write (TFTP write error)
> Cannot write buffer to file
> Cannot copy from config: to tftp:/tftpboot/temp.cfg
> }

Connect fail suggests that the Cisco box can't even connect to the tftp
server. (Have you tried to connect to the server from another linux
box? Checked restrictions for access to the port 69 (UDP) tftp within
your xinetd configuration for that service? Is tftpd actually
starting? Can you get files from the server using a tftp client?)

Run a port scan on the box and UDP port to see if there is anything
"there" ?

Do you have any firewall rules that would prevent requests from passing
into port 69 UDP?

Just to make sure I understand this and am not being dense:
You are trying to have the route tftp a file to the machine running the
tftpd server.
You are not trying to load a file at the router/network equipment from the
server.

> I  have created an empty file, and alsoo tryed with no file....
> {
> [root at proxy1 /tftpboot]# ls -l
> total 0
> -rwxrwxrwx    1 nobody   nobody          0 Apr  3 18:46 test.cfg
> [root at proxy1 /tftpboot]#
> }
> The Kernel: uname: kernel 2.2.22

I was able to perform a little experiment with this on my own system.

By using tftp (client) I can write to a file on an ext2 files system if
nobody.nogroup owns it and has rw access to it. (File needed to be there
with same name even if the dir was rwxrwxrwx.)

>From one server to another I did need a file with the same name as the one
I was attempting to write with tftp (client) to the tftpd directory on the
server.

I'd try experimenting with the tftp client. Within tftp (client) you
should be able to enable "verbose" and "trace" to see more information
about why you can/cant write the file over tftp.

Do you have anything else that could prevent "nobody" from wrigin to that
tree? quotas etc ?
Another Q I would expect you have checked, is the fs containing /tftpboot
mounted rw? (etc.)

If you cant get files sent to the server over tftp from itself, or another
linux box, then I'd continue working on procedures for sending the
file. Error message from the client might be more descriptive and helpful.

If you are willing to let me try to get/put a file on the machine, feel
free to contact me directly in e-mail. I can give you info of the IP
address to expect the connection from, and establish a filename to put and
get as well as try to set up a time. (Sending this data over the list in
public may offer other people that want to "help you" and run some "tests"
of their own. ];> )

Hope something here helps.

-ME

> Original ME Says:>
> > Have ran tftp for a while with Slackware and then later (now) in
> > Debian. Seems to work rather well.
> >
> > A side note (you probably know this) tftp is not really a replacement for
> > ftp or other ftp services. tfpt is most commonly used to transmit new
> > firmware updates to networking equipment, help netbooting devices get an
> > image or kernel or instruction set to start their work, and to play aroud
> > with moving files when you are bored.
> >
> > Long ago, tftpd would (by default) allow any files from "/" to be accessed
> > by UID ~= nobody. Now it seems, many distros have switched over the
> > explicit "new roots" often using "/boot" or some other name.
> >
> > How are you trying to use tftp, and in what context?
> >
> > -ME




More information about the talk mailing list