Re: [squid-users] Problem with FTP upload through squid : truncated files

From: Henri Walazo <henri.walazo@dont-contact.us>
Date: Mon, 24 Jan 2005 11:01:54 +0100

Here are some access.log excerpts when I try different operations :

First I download from ftp.redhat.com the file abiword-1.0.4-2.i386.rpm
(4.98 MB) (in binary mode)
I get this line in access.log :
1106558551.810 14298 192.168.1.3 TCP_MISS/200 5232437 CONNECT
ftp.redhat.com:14954 - DIRECT/209.132.176.30 - [Host:
ftp.redhat.com:14954\r\n] []

and the download is correct.

It works perfectly for every ftp download

Then I try to upload a 79kB html file (in ascii mode) on my personal
ftp account :

firstly with smartftp :

I get a 31.5 kB file on my ftp, with the following lines in access.log :

1106557992.094 43 192.168.1.3 TCP_MISS/200 39 CONNECT
ftpperso.free.fr:36467 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:36467\r\n] []
1106557992.154 15 192.168.1.3 TCP_MISS/200 250 CONNECT
ftpperso.free.fr:54180 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:54180\r\n] []

If I retry, I get a 30.1 kB file

1106558060.515 43 192.168.1.3 TCP_MISS/200 39 CONNECT
ftpperso.free.fr:29418 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:29418\r\n] []
1106558060.571 18 192.168.1.3 TCP_MISS/200 250 CONNECT
ftpperso.free.fr:63365 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:63365\r\n] []

Then a 42.6 kB file

1106558090.866 50 192.168.1.3 TCP_MISS/200 39 CONNECT
ftpperso.free.fr:5221 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:5221\r\n] []
1106558090.919 15 192.168.1.3 TCP_MISS/200 250 CONNECT
ftpperso.free.fr:27894 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:27894\r\n] []

and a 31.5 kB file

1106558128.399 46 192.168.1.3 TCP_MISS/200 39 CONNECT
ftpperso.free.fr:10667 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:10667\r\n] []
1106558128.456 16 192.168.1.3 TCP_MISS/200 250 CONNECT
ftpperso.free.fr:47718 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:47718\r\n] []

and a 53.6 kB file

1106558165.607 51 192.168.1.3 TCP_MISS/200 39 CONNECT
ftpperso.free.fr:1246 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:1246\r\n] []
1106558165.667 18 192.168.1.3 TCP_MISS/200 250 CONNECT
ftpperso.free.fr:40582 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:40582\r\n] []

and a 50.9 kB file

1106558198.307 49 192.168.1.3 TCP_MISS/200 39 CONNECT
ftpperso.free.fr:2186 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:2186\r\n] []
1106558198.361 16 192.168.1.3 TCP_MISS/200 250 CONNECT
ftpperso.free.fr:62871 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:62871\r\n] []

and a 28.7 kB file

1106558236.013 45 192.168.1.3 TCP_MISS/200 39 CONNECT
ftpperso.free.fr:49806 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:49806\r\n] []
1106558236.128 75 192.168.1.3 TCP_MISS/200 250 CONNECT
ftpperso.free.fr:53424 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:53424\r\n] []

and so on...

If I use filezilla instead of smartftp I get a 13.8 kB file

1106558918.549 23 192.168.1.3 TCP_MISS/200 39 CONNECT
212.27.40.252:45724 - DIRECT/212.27.40.252 - [Host:
212.27.40.252:45724\r\n] []
1106558918.629 10 192.168.1.3 TCP_MISS/200 250 CONNECT
212.27.40.252:5846 - DIRECT/212.27.40.252 - [Host:
212.27.40.252:5846\r\n] []

then again a 13.8 kB file

1106559209.340 18 192.168.1.3 TCP_MISS/200 39 CONNECT
212.27.40.252:49877 - DIRECT/212.27.40.252 - [Host:
212.27.40.252:49877\r\n] []
1106559209.427 10 192.168.1.3 TCP_MISS/200 250 CONNECT
212.27.40.252:16455 - DIRECT/212.27.40.252 - [Host:
212.27.40.252:16455\r\n] []

and so on

Then I try to upload a 439 kB tgz binary file (in binary mode)

At first with smartftp I get a 424 kB file

1106559593.377 208 192.168.1.3 TCP_MISS/200 39 CONNECT
ftpperso.free.fr:41129 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:41129\r\n] []
1106559593.489 19 192.168.1.3 TCP_MISS/200 313 CONNECT
ftpperso.free.fr:50343 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:50343\r\n] []

then a 408 kB file

1106559690.549 210 192.168.1.3 TCP_MISS/200 39 CONNECT
ftpperso.free.fr:55439 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:55439\r\n] []
1106559690.660 16 192.168.1.3 TCP_MISS/200 313 CONNECT
ftpperso.free.fr:18901 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:18901\r\n] []

and 382 kB file

1106559781.616 210 192.168.1.3 TCP_MISS/200 39 CONNECT
ftpperso.free.fr:64826 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:64826\r\n] []
1106559781.715 24 192.168.1.3 TCP_MISS/200 313 CONNECT
ftpperso.free.fr:3442 - DIRECT/212.27.40.252 - [Host:
ftpperso.free.fr:3442\r\n] []

If I try with filezilla, I get a 379 kB file

1106559871.045 351 192.168.1.3 TCP_MISS/200 39 CONNECT
212.27.40.252:60138 - DIRECT/212.27.40.252 - [Host:
212.27.40.252:60138\r\n] []
1106559871.192 12 192.168.1.3 TCP_MISS/200 313 CONNECT
212.27.40.252:35117 - DIRECT/212.27.40.252 - [Host:
212.27.40.252:35117\r\n] []

then a 414 kB file

1106559926.912 12 192.168.1.3 TCP_MISS/200 313 CONNECT
212.27.40.252:53944 - DIRECT/212.27.40.252 - [Host:
212.27.40.252:53944\r\n] []
1106559929.764 172 192.168.1.3 TCP_MISS/200 39 CONNECT
212.27.40.252:44694 - DIRECT/212.27.40.252 - [Host:
212.27.40.252:44694\r\n] []
1106559929.860 11 192.168.1.3 TCP_MISS/200 313 CONNECT
212.27.40.252:24772 - DIRECT/212.27.40.252 - [Host:
212.27.40.252:24772\r\n] []

and so on...

Does anyone have an idea ?
Thanks
  Henri

On Mon, 24 Jan 2005 07:48:48 +0100, Elsen Marc <elsen@imec.be> wrote:
>
>
> >
> > Hello,
> >
> > I'm using Squid 2.5 STABLE6 (binary version from my Fedora Core 3),
> > and I'm trying to make ftp upload work.
> > Before I try to set more complex ACLs, I simply allowed anyone to
> > access to everything (it's only for the first tests of course).
> > I also commented the line that denied CONNECT to non ssl ports.
> >
> > The result of my first tests are :
> > - no problem with HTTP download
> > - no problem with HTTP upload
> > - no problem with FTP download
> > - but strange problem with FTP upload :
> > I configured my ftp client (filezilla, opensource - cf
> > filezilla.sf.net) to use an http proxy, I set the correct address and
> > port, and then I successfully connected to an external ftp.
> > My client correctly lists the files and folders on my ftp account, and
> > I can succesfully download any files from this ftp.
> > But, if I try to upload a file, it is transferred incompletely to the
> > server, without any error message. The client thinks the transfer is
> > ok, although it is obviously not.
> > For example, when I try to upload a 79 kbytes html file, sometimes I
> > get on the server side a 13 or 65 or 37 kbytes file, it doesn't
> > truncate at the same size for each try with the same file.
> > I get this problem whether I use ascii or binary mode.
> > Same problem if I use smartftp instead of filezilla.
> > I don't see any error in access.log (I can post it if necessary)
> > And of course I don't limit the size of the transfers in squid.conf
> >
> > Does anybody have an idea of how to solve this problem ?
> >
> > I know that squid is not a true ftp proxy, but if this problem was
> > solved, it would do everything that I need with ftp. Besides, I prefer
> > not to use a distinct ftp proxy, because I intend to use squid with
> > ldap authentication (with ldap groups and users), and with restricted
> > ftp access (only a few people will have to use ftp upload, but this
> > functionnality is required).
> >
> >
>
> What's in access.log for these failing http put requests ?
> Compare the number of bytes transferred with the actual size of the file.
>
> Anything else in cache.log ?
>
Received on Mon Jan 24 2005 - 03:01:57 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 07 2005 - 12:59:36 MST