Networking Forums

Networking Forums > Computer Networking > Linux Networking > ftp get corrupts file

Reply
Thread Tools Display Modes

ftp get corrupts file

 
 
anagnost68
Guest
Posts: n/a

 
      01-02-2007, 06:03 PM
I have a NAS storage device that has it's own ftp server. Using a user
of anonymous, if I perform a put of a file of a few meg, let's say 4
meg, when I do a get of that same file it _sometimes_ comes back with a
smaller size. Both the put and get are in binary mode. Most of the
time I'm doing an mget in non-interactive mode. The NAS uses FAT32 and
the ftp client is Windows XP using ntfs. Both have enough space. If I
perform another get of the same file that came back smaller, it usually
comes back with the correct size. The NAS has both ftp and samba
enabled and seems to support microsoft networking. If I transfer a
bunch of files using microsoft networking they seem to get retrieved
correctly.

Any suggestions?

Thanks,

Ted

 
Reply With Quote
 
 
 
 
Snowbat
Guest
Posts: n/a

 
      01-02-2007, 11:38 PM
On Tue, 02 Jan 2007 11:03:00 -0800, anagnost68 wrote:

> and the ftp client is Windows XP using ntfs.


That's your client platform but which ftp client program?
- MS command line FTP client
- Internet Explorer
- something else?

Do you experience the same problem with other ftp client programs?



--


--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
anagnost68
Guest
Posts: n/a

 
      01-03-2007, 05:08 AM
Snowbat wrote:
> On Tue, 02 Jan 2007 11:03:00 -0800, anagnost68 wrote:
>
> > and the ftp client is Windows XP using ntfs.

>
> That's your client platform but which ftp client program?
> - MS command line FTP client
> - Internet Explorer
> - something else?
>
> Do you experience the same problem with other ftp client programs?
>


I experience the problem with the XP command line ftp client and the
fedora core 3 ftp command line client. Here's an example doing an mget
from fedora, notice that the retrieved file sizes are smaller than the
detected file sizes:

ftp -i 192.168.1.101
Connected to 192.168.1.101.
220 NET Disk FTP Server ready.
500 Syntax error, command unrecognized.
500 Syntax error, command unrecognized.
KERBEROS_V4 rejected as an authentication type
Name (192.168.1.101: anonymous
230 User logged in, proceed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
ftp> binary
200 Type set to I.
ftp> lcd .
Local directory now /tmp
ftp> ls
227 Entering Passive Mode (192,168,1,101,80,17).
150 File status okay; about to open data connection.
drw-rw-rw- 1 user group 0 Jan 2 02:51 .
drw-rw-rw- 1 user group 0 Jan 2 02:51 ..
-rw-rw-rw- 1 user group 18705260 Jan 2 23:33 MVI_0013.avi
-rw-rw-rw- 1 user group 27172838 Jan 2 23:33 MVI_0024.avi
-rw-rw-rw- 1 user group 20330004 Jan 2 23:33 MVI_0025.avi
226 Closing data connection.
ftp> mget *
local: . remote: .
227 Entering Passive Mode (192,168,1,101,80,19).
550 Requested action not taken.
Warning: embedded .. in .. (changing to !!)
local: !! remote: !!
227 Entering Passive Mode (192,168,1,101,80,20).
550 Requested action not taken.
local: MVI_0013.avi remote: MVI_0013.avi
227 Entering Passive Mode (192,168,1,101,80,21).
150 Opening BINARY mode data connection for MVI_0013.avi (18705260
bytes).
226 Closing data connection.
18677760 bytes received in 4.5 seconds (4.1e+03 Kbytes/s)
local: MVI_0024.avi remote: MVI_0024.avi
227 Entering Passive Mode (192,168,1,101,80,22).
150 Opening BINARY mode data connection for MVI_0024.avi (27172838
bytes).
226 Closing data connection.
27164672 bytes received in 6.5 seconds (4.1e+03 Kbytes/s)
local: MVI_0025.avi remote: MVI_0025.avi
227 Entering Passive Mode (192,168,1,101,80,23).
150 Opening BINARY mode data connection for MVI_0025.avi (20330004
bytes).
226 Closing data connection.
20316160 bytes received in 4.9 seconds (4.1e+03 Kbytes/s)

What do you think?

 
Reply With Quote
 
Horst Knobloch
Guest
Posts: n/a

 
      01-03-2007, 08:44 AM
Hello,

anagnost68 <(E-Mail Removed)> wrote:

[...]
> I experience the problem with the XP command line ftp client and the
> fedora core 3 ftp command line client. Here's an example doing an mget
> from fedora, notice that the retrieved file sizes are smaller than the
> detected file sizes:


With "retrieved file size" you do not only mean the status
line displayed by your ftp client, but also the file size
of the actual file as shown with ls on the file system, right?
So in other words the file you downloaded is really truncated.


> ftp -i 192.168.1.101

[...]
> ftp> ls
> 227 Entering Passive Mode (192,168,1,101,80,17).
> 150 File status okay; about to open data connection.
> drw-rw-rw- 1 user group 0 Jan 2 02:51 .
> drw-rw-rw- 1 user group 0 Jan 2 02:51 ..
> -rw-rw-rw- 1 user group 18705260 Jan 2 23:33 MVI_0013.avi
> -rw-rw-rw- 1 user group 27172838 Jan 2 23:33 MVI_0024.avi
> -rw-rw-rw- 1 user group 20330004 Jan 2 23:33 MVI_0025.avi
> 226 Closing data connection.
> ftp> mget *
> local: . remote: .
> 227 Entering Passive Mode (192,168,1,101,80,19).
> 550 Requested action not taken.
> Warning: embedded .. in .. (changing to !!)
> local: !! remote: !!
> 227 Entering Passive Mode (192,168,1,101,80,20).
> 550 Requested action not taken.
> local: MVI_0013.avi remote: MVI_0013.avi
> 227 Entering Passive Mode (192,168,1,101,80,21).
> 150 Opening BINARY mode data connection for MVI_0013.avi (18705260
> bytes).
> 226 Closing data connection.
> 18677760 bytes received in 4.5 seconds (4.1e+03 Kbytes/s)
> local: MVI_0024.avi remote: MVI_0024.avi
> 227 Entering Passive Mode (192,168,1,101,80,22).
> 150 Opening BINARY mode data connection for MVI_0024.avi (27172838
> bytes).
> 226 Closing data connection.
> 27164672 bytes received in 6.5 seconds (4.1e+03 Kbytes/s)
> local: MVI_0025.avi remote: MVI_0025.avi
> 227 Entering Passive Mode (192,168,1,101,80,23).
> 150 Opening BINARY mode data connection for MVI_0025.avi (20330004
> bytes).
> 226 Closing data connection.
> 20316160 bytes received in 4.9 seconds (4.1e+03 Kbytes/s)
>
> What do you think?



Did you notice that the actually transferred size (as shown
by the client above) is always a multiple of 512 and that
the file size is also one time bigger?

You may also fire up ethereal/wireshark and check whether
the FTP transfers are showing something suspcious. However
I suspect it will only show that just the transferred amount
of bytes is wrong. ;-)

I guess there is a totally broken FTP server implementation
running on your NAS box. I would google for your NAS box
regarding FTP bugs and look for an update of the SW
running on the box.


Ciao, Horst
--
When pings go wrong (It hurts me too) E.Clapton/E.James/P.Tscharn
 
Reply With Quote
 
anagnost68
Guest
Posts: n/a

 
      01-04-2007, 05:35 PM
> I guess there is a totally broken FTP server implementation
> running on your NAS box. I would google for your NAS box
> regarding FTP bugs and look for an update of the SW
> running on the box.
>
>


Thanks Horst. That was the problem.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
File Copy Windows -> SMB Linux; File size problem Publishers Press Windows Networking 0 10-23-2008 06:05 PM
IPsec in Transport mode: Linux corrupts TCP traffic?! Mouse Linux Networking 0 08-12-2005 12:35 PM
Locking a file temporarily (till the file is transferred completely). Lince M Lawrence Linux Networking 2 11-10-2004 01:15 AM
Login Script - a log file overwritten by echo %var% >> file john Windows Networking 0 02-27-2004 09:36 PM
Re: NFS Crashes LTSP and NFS Servers and Corrupts Data! Need Help! Joe Beanfish Linux Networking 1 06-24-2003 11:23 AM



1 2 3 4 5 6 7 8 9 10 11