I am having problems transferring a text file from Windows 7 using ftp.exe
to a FreeBSD server. After the file transfer the end-of-line characters are not changed from \r\n
to \n
, Instead they remain with the carriage return character which can be seen in for example mcedit
as ^M
. The file is transferred in ascii
mode.
Has anybody run into similar problems in the past? As far as I know using the ascii
mode during FTP
transfer should convert those characters automatically. Does it depend on the server configuration?
EDIT: The file can be seen here.
EDIT: I have also tried with ncftp.exe
under Cygwin
but the result is the same. The carriage return character has not been removed even if the transfer type was ASCII
.
EDIT: It does not work the other way round either. I created a text file in FreeBSD and then downloaded it is ASCII
mode to my Windows machine. The end of line characters remained LF
as they were in FreeBSD
.
EDIT: The lit stat
returns
211-FTP server status:
Connected to 160.135.126.21
Logged in as user
TYPE: ASCII
No session bandwidth limit
Session timeout in seconds is 320
Control connection is plain text
Data connections will be plain text
At session startup, client count was 9
vsFTPd 2.3.4 - secure, fast, stable
211 End of status
vsFTPd, in a misguided effort to make their daemon "very secure", has disabled ASCII EoL conversion by default. It has to be manually re-enabled by editing the configuration (
/usr/local/etc/vsftpd.conf
by default) file and adding the following lines: