TFTP put problems

Till Straumann strauman at SLAC.Stanford.EDU
Fri Nov 16 20:12:49 UTC 2001


Eric Norum wrote:

> Davide Del Vento wrote:
> >
> > Hi all again.
> > I successful configure my system that now work: from my RTEMS TFTP client I
> > can download files in my linux server.
> >
> > I would like to upload something, as stated by Eric in message:
> > http://www.oarcorp.com/rtems/maillistArchives/rtems-users/2001/april/msg00073.html
> >
> > But I obtain "Open failed" when I try the
> > fopen("/TFTP/myipnumber/myfile", "w");
> >
> > I have a look at my server log and (very strange!) I found that the client
> > tries to read myfile, instead of write!
> >
> > Obviously my server is well-configured and I can upload files from other
> > sources, and when I do it, the log doesn't show any read request, only
> > write.
> >
> > In old messages (eg.
> > http://www.oarcorp.com/rtems/maillistArchives/rtems-users/2000/september/msg00031.html
> > )
> > many people say that TFTP doesn't support write...
> >
> > Was Eric wrong?
> > Or is the upload feature be activated in same way?
> >
> > I use rtems-4.5.0
>
> TFTP write operations are a more recent addition.  4.5.0 is getting
> *very* out of date.
>
> Uploads did work, and do work here, but I see that the TFTP driver in
> the latest snapshots has lost some changes needed to support write
> operations.  I've sent a patch to Joel so the next snapshot should have
> write operations working again.
>

I also found that TFTPfs write in the 20011025 snapshot was broken.
Strange enough, the following work-around works for me:

   fd = open("/TFTP/<host>/<file>",O_WRONLY);
   feil = fdopen(fd,"w");

While I'm able to write to 'feil' opened in this way, a straight 'fopen()'
would not work...

>
> One thing to remember is that, for security purposes, many TFTP servers
> require that the file already exist before it can be opened for writing.
>
> --
> Eric Norum                                 eric.norum at usask.ca
> Department of Electrical Engineering       Phone: (306) 966-5394
> University of Saskatchewan                 FAX:   (306) 966-5407
> Saskatoon, Canada.




More information about the users mailing list