Networking Forums

Networking Forums > Computer Networking > Linux Networking > Very basic FTP question

Reply
Thread Tools Display Modes

Very basic FTP question

 
 
Nicola Attico
Guest
Posts: n/a

 
      07-11-2007, 04:12 PM
Hi,

I'm transferring a file from linux to windows
ftp server is on linux (Linux DEMO3 2.4.18-14 #1 Wed Sep 4 13:35:50
EDT 2002 i686) and I use ftp client on windows
My file is called test.txt and I put in it:

hello
world

If I transfer the file in BINARY mode on windows I get:

helloâ–¡worldâ–¡

If I transfer the file in ASCII mode I get...

helloâ–¡worldâ–¡

...exactly the same

If I understand correctly, the only purpose of ASCII transfer is to re-
interpret the newline character depending on the platform

So I assume that ASCII transfer is not working correctly

am I correct?
is it a bug?
how can I make it work?

For the moment, I'm solving the issue running the unix2dos utility on
my windows box

I hope this is the right place for this question, otherwise thanks to
redirect me

Ciao,

Nicola Attico

 
Reply With Quote
 
 
 
 
Vilmos Soti
Guest
Posts: n/a

 
      07-11-2007, 04:47 PM
Nicola Attico <(E-Mail Removed)> writes:

> I'm transferring a file from linux to windows
> ftp server is on linux (Linux DEMO3 2.4.18-14 #1 Wed Sep 4 13:35:50
> EDT 2002 i686) and I use ftp client on windows
> My file is called test.txt and I put in it:


OK.

> hello
> world
>
> If I transfer the file in BINARY mode on windows I get:
>
> helloþÿ%¡worldþÿ%¡


Seems reasonable.

> If I transfer the file in ASCII mode I get...
>
> helloþÿ%¡worldþÿ%¡
>
> ..exactly the same


That doesn't look right.

> If I understand correctly, the only purpose of ASCII transfer is to re-
> interpret the newline character depending on the platform


Yes.

> So I assume that ASCII transfer is not working correctly


Sounds right.

> is it a bug?


Quite possibly.

> how can I make it work?


Check the windows ftp client.

> I hope this is the right place for this question, otherwise thanks to
> redirect me


This sounds like a bug in your ftp client, so you might want to
look at that direction.

Vilmos
 
Reply With Quote
 
Rikishi 42
Guest
Posts: n/a

 
      07-11-2007, 05:08 PM
On 2007-07-11, Nicola Attico <(E-Mail Removed)> wrote:

> If I understand correctly, the only purpose of ASCII transfer is to re-
> interpret the newline character depending on the platform
>
> So I assume that ASCII transfer is not working correctly


You assume correctly.

But what is your Windows ftp client?
And have you tried it with the command-line ftp client of Windows?


--
There is an art, it says, or rather, a knack to flying.
The knack lies in learning how to throw yourself at the ground and miss.
Douglas Adams
 
Reply With Quote
 
Nicola Attico
Guest
Posts: n/a

 
      07-11-2007, 07:58 PM
On 11 Lug, 19:08, Rikishi 42 <fsck_s...@telenet.be> wrote:

> But what is your Windows ftp client?
> And have you tried it with the command-line ftp client of Windows?


I'm using the windows command-line old ftp client (the standard one..)

Nicola Attico

 
Reply With Quote
 
Nicola Attico
Guest
Posts: n/a

 
      07-11-2007, 09:49 PM
On 11 Lug, 19:08, Rikishi 42 <fsck_s...@telenet.be> wrote:
>
> > But what is your Windows ftp client?
> > And have you tried it with the command-line ftp client of Windows?


Uhmmm.. I tried with a second machine (Linux Fedora) and it is exactly
the same with the standard Windows client...

Can someone have a different behaviour?

I start thinking I used it for years without an understanding

Just puzzled...

Nicola Attico

 
Reply With Quote
 
Christoph Scheurer
Guest
Posts: n/a

 
      07-12-2007, 09:12 AM
Nicola Attico schrieb:
> Hi,
>
> I'm transferring a file from linux to windows
> ftp server is on linux (Linux DEMO3 2.4.18-14 #1 Wed Sep 4 13:35:50
> EDT 2002 i686) and I use ftp client on windows
> My file is called test.txt and I put in it:
>
> hello
> world
>
> If I transfer the file in BINARY mode on windows I get:
>
> helloâ–¡worldâ–¡
>
> If I transfer the file in ASCII mode I get...
>
> helloâ–¡worldâ–¡
>
> ..exactly the same
>
> If I understand correctly, the only purpose of ASCII transfer is to re-
> interpret the newline character depending on the platform
>
> So I assume that ASCII transfer is not working correctly
>
> am I correct?
> is it a bug?
> how can I make it work?
>
> For the moment, I'm solving the issue running the unix2dos utility on
> my windows box
>
> I hope this is the right place for this question, otherwise thanks to
> redirect me
>
> Ciao,
>
> Nicola Attico
>

Running unix2dos to read textfiles on windows, that were written
under linux is the ONLY way. Unix ( and so also Linux ) use only a
Newline to mark the end of a line, while Windows needs a
Return+Newline on the end of a line.
It has NOTHING to do with which ftp-client or which ftp-mode a
textfile is transfered, the result will allways be the same.

Greets
Chris
 
Reply With Quote
 
Max
Guest
Posts: n/a

 
      07-12-2007, 11:41 AM
Christoph Scheurer schreef:
> Nicola Attico schrieb:
>> Hi,
>>
>> I'm transferring a file from linux to windows
>> ftp server is on linux (Linux DEMO3 2.4.18-14 #1 Wed Sep 4 13:35:50
>> EDT 2002 i686) and I use ftp client on windows
>> My file is called test.txt and I put in it:
>>
>> hello
>> world
>>
>> If I transfer the file in BINARY mode on windows I get:
>>
>> helloâ–¡worldâ–¡
>>
>> If I transfer the file in ASCII mode I get...
>>
>> helloâ–¡worldâ–¡
>>
>> ..exactly the same
>>
>> If I understand correctly, the only purpose of ASCII transfer is to re-
>> interpret the newline character depending on the platform
>>
>> So I assume that ASCII transfer is not working correctly
>>
>> am I correct?
>> is it a bug?
>> how can I make it work?
>>
>> For the moment, I'm solving the issue running the unix2dos utility on
>> my windows box
>>
>> I hope this is the right place for this question, otherwise thanks to
>> redirect me
>>
>> Ciao,
>>
>> Nicola Attico
>>

> Running unix2dos to read textfiles on windows, that were written
> under linux is the ONLY way. Unix ( and so also Linux ) use only a
> Newline to mark the end of a line, while Windows needs a
> Return+Newline on the end of a line.
> It has NOTHING to do with which ftp-client or which ftp-mode a
> textfile is transfered, the result will allways be the same.
>
> Greets
> Chris


Not true.

Using FileZila 2.2 on Windows and the standard FTP server from Debian
Sarge gives:

using Binary transfer type:
helloâ–¡worldâ–¡â–¡

using ASCII transfer type:
hello
world

My advise is to try a different FTP client.

--
Max

Open Source is an ode to common sense
 
Reply With Quote
 
Nicola Attico
Guest
Posts: n/a

 
      07-12-2007, 12:57 PM
On 12 Lug, 11:12, Christoph Scheurer <cyberf...@rebmatt.ch> wrote:
> Running unix2dos to read textfiles on windows, that were written
> under linux is the ONLY way. Unix ( and so also Linux ) use only a
> Newline to mark the end of a line, while Windows needs a
> Return+Newline on the end of a line.
> It has NOTHING to do with which ftp-client or which ftp-mode a
> textfile is transfered, the result will allways be the same.


Hi Christoph,

so... what the ASCII transfer mode is there for ???

Is it completely useless ???

Thanks in advance,

Nicola

 
Reply With Quote
 
Rikishi 42
Guest
Posts: n/a

 
      07-12-2007, 09:06 PM
On 2007-07-12, Christoph Scheurer <(E-Mail Removed)> wrote:

> Running unix2dos to read textfiles on windows, that were written
> under linux is the ONLY way. Unix ( and so also Linux ) use only a
> Newline to mark the end of a line, while Windows needs a
> Return+Newline on the end of a line.
> It has NOTHING to do with which ftp-client or which ftp-mode a
> textfile is transfered, the result will allways be the same.


Sorry, but you're wrong.

Using ASCII transfer mode is exactly what you'd want to transfer plain text
files between OS's that use different EOL's. And not only for Windows/Linux,
btw.

I used it for years to pass sources between DOS, OS/2, Windows, Unix, Linux
and more ancient systems. It meant I never had to worry about EOL.
The receiving system defined what EOL would be written in the destination.

There might be a problem with the command line client, though. I allmost
never used it.


--
There is an art, it says, or rather, a knack to flying.
The knack lies in learning how to throw yourself at the ground and miss.
Douglas Adams
 
Reply With Quote
 
Nicola Attico
Guest
Posts: n/a

 
      07-13-2007, 01:09 PM
On 12 Lug, 23:06, Rikishi 42 <fsck_s...@telenet.be> wrote:
> There might be a problem with the command line client, though. I allmost
> never used it.

Do you know who's in charge of newline conversion?
The ftp server or the ftp client?
Maybe this is Linux FTP server (vsftpd) that sucks.. :-)

ciao,

Nicola Attico


 
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
basic question tanewha1956@gmail.com Wireless Internet 5 02-11-2007 11:34 PM
Very basic LAN question Anthony Campbell Linux Networking 28 09-20-2005 12:51 PM
Basic question, but..... Mr. Matthew Primus Wireless Internet 11 06-11-2005 12:58 AM
Basic Question Dann Porter Wireless Internet 1 12-17-2003 08:13 PM
Basic question about 802.11 Mf12 Wireless Internet 5 11-15-2003 07:41 PM



1 2 3 4 5 6 7 8 9 10 11