Jump to content

Very basic ftp question


Recommended Posts

Guest Nicola Attico
Posted

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 mode of the windows FTP client 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

  • Replies 9
  • Created
  • Last Reply
Guest Marcin Domaslawski
Posted

Re: Very basic ftp question

 

Hi,

 

You probably know that end of line in Linux is different then on Windows.

If your test file was created on Linux, then on Windows it will be always

hello□world□ ... ftp client cant change content of file by changing end of

line from Linux format to Windows.

 

Marcin Domaslawski

 

 

"Nicola Attico" <nicola.attico@gmail.com> wrote in message

news:1184170774.279185.267990@n2g2000hse.googlegroups.com...

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 mode of the windows FTP client 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

Guest Nicola Attico
Posted

Re: Very basic ftp question

 

On 11 Lug, 21:19, "Marcin Domaslawski" <mila...@wp.pl> wrote:

> You probably know that end of line in Linux is different then on Windows.

> If your test file was created on Linux, then on Windows it will be always

> hello□world□ ... ftp client cant change content of file by changing end of

> line from Linux format to Windows.

 

hi Marcin,

 

I guessed this was what the ASCII option was there for

 

Am I wrong ?

 

Nicola Attico

Guest Tim Slattery
Posted

Re: Very basic ftp question

 

"Marcin Domaslawski" <mila025@wp.pl> wrote:

>Hi,

>

>You probably know that end of line in Linux is different then on Windows.

>If your test file was created on Linux, then on Windows it will be always

>hello?world? ... ftp client cant change content of file by changing end of

>line from Linux format to Windows.

 

If OP uses ASCII mode on his Windows FTP client when he fetches the

file from the Linux machine, it should convert the End Of Line

characters. According to OP's post, that's not happening. I don't know

why that should be so.

 

--

Tim Slattery

MS MVP(DTS)

Slattery_T@bls.gov

http://members.cox.net/slatteryt

Guest Marcin Domaslawski
Posted

Re: Very basic ftp question

 

Hi,

 

ASCII is mode to transfer text files. Problem is caused by incomatibility of

unix/linux systems and windows.

 

The same thing you can notice if you will want transfer text file created on

Windows to linux e.g. in MC when you will want edit it there will be

annoying ^M on the end of lines.

 

Marcin Domaslawski

 

 

"Nicola Attico" <nicola.attico@gmail.com> wrote in message

news:1184184333.878359.269060@w3g2000hsg.googlegroups.com...

On 11 Lug, 21:19, "Marcin Domaslawski" <mila...@wp.pl> wrote:

> You probably know that end of line in Linux is different then on Windows.

> If your test file was created on Linux, then on Windows it will be always

> hello□world□ ... ftp client cant change content of file by changing end of

> line from Linux format to Windows.

 

hi Marcin,

 

I guessed this was what the ASCII option was there for

 

Am I wrong ?

 

Nicola Attico

Guest Marcin Domaslawski
Posted

Re: Very basic ftp question

 

Hi,

 

You want that simple FTP client - app to transfer files to/from - should

convert files.

 

I can agree that optionally should be that feature, but I'm not sure if

popular commercial FTP clients do this.

 

Marcin Domaslawski

 

 

"Tim Slattery" <Slattery_T@bls.gov> wrote in message

news:q4ea93ptc4n373emeg7mbq5qcsdd4k3nv3@4ax.com...

> "Marcin Domaslawski" <mila025@wp.pl> wrote:

>

>>Hi,

>>

>>You probably know that end of line in Linux is different then on Windows.

>>If your test file was created on Linux, then on Windows it will be always

>>hello?world? ... ftp client cant change content of file by changing end of

>>line from Linux format to Windows.

>

> If OP uses ASCII mode on his Windows FTP client when he fetches the

> file from the Linux machine, it should convert the End Of Line

> characters. According to OP's post, that's not happening. I don't know

> why that should be so.

>

> --

> Tim Slattery

> MS MVP(DTS)

> Slattery_T@bls.gov

> http://members.cox.net/slatteryt

Guest Tim Slattery
Posted

Re: Very basic ftp question

 

"Marcin Domaslawski" <mila025@wp.pl> wrote:

>Hi,

>

>You want that simple FTP client - app to transfer files to/from - should

>convert files.

>

>I can agree that optionally should be that feature, but I'm not sure if

>popular commercial FTP clients do this.

 

Of course they do, that's the purpose of ASCII mode. It's been part of

the FTP specification since day one.

 

--

Tim Slattery

MS MVP(DTS)

Slattery_T@bls.gov

http://members.cox.net/slatteryt

Guest Nicola Attico
Posted

Re: Very basic ftp question

 

On 12 Lug, 14:50, Tim Slattery <Slatter...@bls.gov> wrote:

> Of course they do, that's the purpose of ASCII mode. It's been part of

> the FTP specification since day one.

 

Tim,

 

I agree with you

Anyway, I have to notice that apparently it does not work at all for

the Windows standard ftp client

 

Anyone can clarify?

 

Thanks in advance,

 

Nicola Attico

Guest Marcin Domaslawski
Posted

Re: Very basic ftp question

 

Hi,

 

ok you're right - I got my mistake ... I suggested myself with auto mode

 

need more coffee or sleeping :D

 

Marcin Domaslawski

 

 

"Tim Slattery" <Slattery_T@bls.gov> wrote in message

news:qq8c93hbf0ner83prgesinkneor07si4bl@4ax.com...

> "Marcin Domaslawski" <mila025@wp.pl> wrote:

>

>>Hi,

>>

>>You want that simple FTP client - app to transfer files to/from - should

>>convert files.

>>

>>I can agree that optionally should be that feature, but I'm not sure if

>>popular commercial FTP clients do this.

>

> Of course they do, that's the purpose of ASCII mode. It's been part of

> the FTP specification since day one.

>

> --

> Tim Slattery

> MS MVP(DTS)

> Slattery_T@bls.gov

> http://members.cox.net/slatteryt

Guest Nicola Attico
Posted

Re: Very basic ftp question

 

Solution found on comp.os.linux.networking

It's a configuration parameter on the vsftpd.conf file

here is the explaination

 

# By default the server will pretend to allow ASCII mode but in fact

ignore

# the request. Turn on the below options to have the server actually

do ASCII

# mangling on files when in ASCII mode.

# Beware that turning on ascii_download_enable enables malicious

remote parties

# to consume your I/O resources, by issuing the command "SIZE /big/

file" in

# ASCII mode.

# These ASCII options are split into upload and download because you

may wish

# to enable ASCII uploads (to prevent uploaded scripts etc. from

breaking),

# without the DoS risk of SIZE and ASCII downloads. ASCII mangling

should be

# on the client anyway..

#ascii_upload_enable=YES

#ascii_download_enable=YES

 

ciao

 

Nicola Attico


×
×
  • Create New...