FTP uploading and downloading at the same time

FTP uploading and downloading at the same time

Post by sebasti » Fri, 29 Nov 2002 20:44:30


Hi,

I have a problem and I do not know if it can be solved by editing the
FTP server or the kernel.

Description :
-------------
my equipment (E) downloads file from an FTP server (S). At the same
time my equipement acts as an FTP server for an end user (U).

my equipment(E) = kernel 2.2, slackware 7.2 distribution with
wu-ftpserver
User (U) = WinNT ftp client.
FTP-server (S) is some linux FTP server.

Problem :
----------

When a big file is beeing downloaded from the ftp server (S) to my
equipment(E) and that at the same time a user (U) downloads this same
file from my equipment to his machine.

The user (U) will get only a part of the orignial file

Example :
---------
On the server (S) there is a 13 Mo file.
On (U)after the transfer, the file will be <13 Mo if the download from
U is done while the file is being downloaded from (S) to (E).

?????  :
--------
Does anyone know how to block access to the file on my equipment (E)
or to make the connection from U to E waiting ?

Where can I parametrer this ? On linux? On the wu-ftp server ?

Thanks for your advice.

Sebastien.

 
 
 

FTP uploading and downloading at the same time

Post by scot » Sat, 30 Nov 2002 01:58:33



> Does anyone know how to block access to the file on my equipment (E)
> or to make the connection from U to E waiting ?

Well, you can set your equiptment up to download the file under a different
name or into a temporary directory. Then when finished downloading have the
script mv the file to the appropriate place. Or you can download the file
and make sure the permissions prevent reading from anybody but you (maybe
use the umask command?)

Scott

 
 
 

FTP uploading and downloading at the same time

Post by Paul Lutu » Sat, 30 Nov 2002 01:59:14


/ ...

Quote:> Does anyone know how to block access to the file on my equipment (E)
> or to make the connection from U to E waiting ?

Download to a separate download directory, then transfer the completed
file to the public directory. Do this with a shell script that controls the
FTP download activity and then moves the complete file to the public area.

--
Paul Lutus
www.arachnoid.com

 
 
 

FTP uploading and downloading at the same time

Post by Frank da Cr » Sat, 30 Nov 2002 04:31:01



: > Does anyone know how to block access to the file on my equipment (E)
: > or to make the connection from U to E waiting ?
:
: Well, you can set your equiptment up to download the file under a different
: name or into a temporary directory. Then when finished downloading have the
: script mv the file to the appropriate place. Or you can download the file
: and make sure the permissions prevent reading from anybody but you (maybe
: use the umask command?)
:
This sort of thing is most easily (and safely) accomplished using an FTP
client that was designed for it:

  http://www.columbia.edu/kermit/ftpclient.html

by including scriptable, testable commands, facilities for moving or
renaming a file immediately upon successful reception, and so on.  For
instructions and examples see:

  http://www.columbia.edu/kermit/ftpscripts.html

- Frank

 
 
 

FTP uploading and downloading at the same time

Post by sebasti » Thu, 05 Dec 2002 02:03:53


Thanks you all for your answers,

I have some more information on my system :

1) The system is an embedded system so that the processor is a 486 133
MHZ
2) The number of file dowloaded every 10-20 minutes is huge around 500
so copying them again may be slowing down the processes.
3) There is one file per day that keeps growing so that mostly it is
the same file thay is beeing downloaded many time a day.

UMASK SOLUTION :
----------------

It seems good so that the end user will only see the file that he can
really downloads. But the donwload and upload processes are different.

So when the end user begins to download the lists connecting to the
FTP site some file may not be available for retrieving anymore.

The good point is that this solution does not permit to download a
file that is not complete.

But there will still be problem of file that may not be downloadable.

KERMIT SOLUTION :
-----------------

The problem that I experience now is that the file downloads OK but
the end user will only get about 80% of the file (or 40 %).. I do not
have errors so I do not understand how this can help.
I will do some testing.

MOVING SOLUTION :
-----------------

This has the same advantages and drawbacks as the Umask solution + a
little bit of overhead for my small PC.

In short I was expecting some "behind the scene" processes for FTP
that says this file is already in use. Wait until the end of the
process. I guess that this does not exists.

Thanks.

Sebastien.

 
 
 

FTP uploading and downloading at the same time

Post by Frank da Cr » Thu, 05 Dec 2002 02:38:50



: ...
: KERMIT SOLUTION :
: -----------------
:
: The problem that I experience now is that the file downloads OK but
: the end user will only get about 80% of the file (or 40 %).. I do not
: have errors so I do not understand how this can help.
: I will do some testing.
:
I'll be glad to help you with this, but of course I will need to know
the details.  Which Kermit program(s) and version(s) on which platform(s)?
Which protocol, Kermit or FTP?  Text mode or binary mode?  Etc etc.

: In short I was expecting some "behind the scene" processes for FTP
: that says this file is already in use. Wait until the end of the
: process. I guess that this does not exists.
:
Kermit can handle questions like this, depending on exactly what you
mean.  It can:

 . Transfer a file only if a file doesn't already exist with the same name.
 . Ditto, but only if the source file is newer.
 . Move and/or rename a received file immediately upon successful receipt.
 . Move and/or rename a source file immediately upon successful sending.

And so on.  Explain exactly what you want to do and I can show you how to
do it.  If I didn't mention these references before, see:

  http://www.columbia.edu/kermit/ftpscripts.html
  http://www.columbia.edu/kermit/case10.html

- Frank

 
 
 

1. BIG differences in ftp upload/download times

Congrats...20kb/s is mighty impressive over a 28.8kbps modem.  Now try
doing that with files of more than just a few bytes.

What you most likely saw was a file of a few hundred bytes to a few kb
sent to your modem's buffer in an instant, and your ftp client assumed the
file was sent, real fast.  Even on really compressible text, the best I've
seen from v.34 is about 9kb/s over a 26.4kbps connection, using a 128kb
file.

I get noticably faster downloads than uploads, but that's due to a nasty
bug in my modem...not linux or pppd.

------------------------------------------------------------------

                               |
                               |
 Mime attachments are OK       |
 But please ask before sending unsolicited huge files.

http://inorganic5.chem.ufl.edu

2. Q: Has anyone out there used "pen-based" mouse in Linux?

3. VERY slow FTP uploads, downloads are fine --ppp or ftp setup problem?

4. Cannot find libncurses.so.1

5. Upload/Download ratios, Time frames & getty_ps hangup

6. How to log sendmail?

7. APACHE: FILE UPLOAD SLOWER THAN DOWNLOAD about 3,5 times on a fast connection

8. Recommend a SATA motherboard?

9. FTP slow download fast upload Red-Hat 6.1

10. ftp upload/download loggging in SOlaris 2.6

11. FTP upload goes down when download is using

12. Allowing FTP upload but not download

13. FTP with uploading and downloading ratio