Re: Aix vs Linux file transfers to windows
- From: Mark Schlechte <mschlechte@xxxxxxxxx>
- Date: Thu, 23 Jul 2009 11:05:37 -0600
Yah I noticed the same thing. Notepad shows it as it is while wordpad seems to have more smarts and makes it look likes it's ok.
I found that the vsftpd.conf file has a section on ascii downloads where it says:
# 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.
I realize this is a setting added for security but I uncommented it and I believe it now works as expected.
Curious: What are pgm are you using to view the files on the Windows side. If I copy a unix file over to my unix host ( AIX ) . Using Notepad ... everything smushed to 1 line. If a use wordpad .. everything looks just fine. I never use these as actual editors but there is a difference.<jkstevenson@xxxxxxxxxx> 23/Jul/2009 11:00 am >>>
Jon
From: Mark Schlechte [mailto:mschlechte@xxxxxxxxx]
Sent: Thursday, July 23, 2009 9:23 AM
To: jkstevenson; IBM AIX Discussion List
Subject: Re: Aix vs Linux file transfers to windows
Using ftp (so far my testing is using filezilla) a basic text file created with VI on Aix looks fine on my windows pc.
Meaning 2nd line starts on 2nd line and no special character [] at the end of the line.
Same test coming from a linux server (Red Hat) shows [] at the end of the line and 2nd line continues on the end of the 1st line.
If I use od -c on both servers both files show '\n' only so FILE is in UNIX format.
If I use unix2dos on the file created on my linux server and use od -c on it I can see it now uses '\r \n' DOS format.
That file transferred via ftp (I've set the transfer protocol to be ACSII) then looks fine on my windows pc.
So I'm trying to understand why the Aix server works and the Linux server does not and if there is some configuration setting I need to change.
I'm using vsftp on the linux server and thinking maybe there is some conf file setting.
Not quite clear on what you are asking.<jkstevenson@xxxxxxxxxx> 22/Jul/2009 4:54 pm >>>
Unix uses LF only ... haven't run across one that doesn't this includes AIX
Windows is CR / LF ...
ftp by default will use ASCII unless told to do otherwise ( FTP does no manipulations of the data within the file - ASCII or BINARY )
Are you sure that the files your are ftp'ing from the AIX hosts are not already in DOS format? A good editor emacs or crimson .. such will actually tell you the format of the file.
use od -C filename before you transfer the file ...
if you see:
0000000 # ! / b i n / s h \n ( FILE IS UNIX FORMAT )
0005320 ' ' ; \r \n ( FILE IS DOS FORMAT )
What you can do is use sed to replace the LF with CR/LF ( use the hex ) and ftp - ( ftp dash ) as a pipe. If someone other than yourself has previously edited these files and used a windows machine to push them back out to the unix host then you might be getting fooled. They may have always been DOS... Also make sure someone hasn't aliased the ftp command to some other utility.
Jon
From: IBM AIX Discussion List [mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of Mark Schlechte
Sent: Wednesday, July 22, 2009 3:54 PM
To: aix-l@xxxxxxxxxxxxx
Subject: Aix vs Linux file transfers to windows
Greetings,
I am aware of the whole file transfer issues between windows and Unix's but I do seem to have an issue I'm looking for some feedback on.
When I transfer a text file from my Aix servers to windows via ftp it's all good.
If I ftp a text file from a Linux server to my windows pc I get a square at the end of the line.
If I run unix2dos against the file and then xfer it works but it's an extra step I don't want to have to run.
I tried changing my ftp program to transfer text files in ASCII but that didn't seem to make a difference.
So what's good ol Aix doing that's different?
DISCLAIMER: The information transmitted is intended only for the addressee and may contain confidential, proprietary and/or privileged material. Any unauthorized review, distribution or other use of or the taking of any action in reliance upon this information is prohibited. If you received this in error, please contact the sender and delete or destroy this message and any copies.
DISCLAIMER: The information transmitted is intended only for the addressee and may contain confidential, proprietary and/or privileged material. Any unauthorized review, distribution or other use of or the taking of any action in reliance upon this information is prohibited. If you received this in error, please contact the sender and delete or destroy this message and any copies.
DISCLAIMER: The information transmitted is intended only for the addressee and may contain confidential, proprietary and/or privileged material. Any unauthorized review, distribution or other use of or the taking of any action in reliance upon this information is prohibited. If you received this in error, please contact the sender and delete or destroy this message and any copies.
- Follow-Ups:
- Re: Aix vs Linux file transfers to windows
- From: Davignon, Edward
- Re: Aix vs Linux file transfers to windows
- References:
- Aix vs Linux file transfers to windows
- From: Mark Schlechte
- Re: Aix vs Linux file transfers to windows
- From: jkstevenson
- Re: Aix vs Linux file transfers to windows
- From: Mark Schlechte
- Re: Aix vs Linux file transfers to windows
- From: jkstevenson
- Aix vs Linux file transfers to windows
- Prev by Date: Re: Aix vs Linux file transfers to windows
- Next by Date: Log file accidentally deleted while open.
- Previous by thread: Re: Aix vs Linux file transfers to windows
- Next by thread: Re: Aix vs Linux file transfers to windows
- Index(es):
Relevant Pages
|