IIS 5 & IIS 6
FTP - Stripping trailing spaces
Last post Feb 27, 2009 10:20 AM by Paul Lynch
Feb 26, 2009 08:39 AM|BG1802|LINK
When sending a file from a Unisys MCP host to a Windows 2003 Server running 2003 SP2, the server is stripping leading spaces from the file.
The server was only upgraded to SP2 last weekend and prior to that the server was not stripping the leading spaces.
I have looked in the IIS options but there is nothing obvious.
Any help would be appreciated.
Feb 26, 2009 10:06 AMfirstname.lastname@example.org|LINK
Binary or ASCII transfer?
Feb 26, 2009 10:11 AM|BG1802|LINK
The transfer is ASCII.
I'm told it may be a fault in 2003 SP2?
Feb 27, 2009 05:22 AM|Paul Lynch|LINK
I can't reproduce this error on an IIS 6.0 SP2 machine with either binary or ASCII mode transfers.
I had an SP1 test server and I got one of our Unix guys to FTP a file to it with a leading space in its name ' test.txt'. I then upgraded this machine and was still able to upload files with leading spaces in their names.
I tried both binary and ASCII and they both worked. Running Process Monitor on the server whilst the files were being uploaded I can see the files being created with the appropriate spaces in their names.
What does your FTP log file say ? Mine shows this :
2009-02-27 10:21:19 xxx.xxx.26.11 ftpuser4 MSFTPSVC1012388136 W2K3SP2 xxx.xxx.26.20 21 created /ftpuser4/++test.txt - 226 0 0 0 30 FTP - -
Feb 27, 2009 08:56 AM|BG1802|LINK
It's not stripping leading spaces from the file name, it's stripping then from the contents of the file.
Feb 27, 2009 10:08 AM|Paul Lynch|LINK
Ah.... OK, well I'll see if I can repro that issue then.....
Feb 27, 2009 10:20 AM|Paul Lynch|LINK
Nope, I can't repro this on an IIS 6.0 SP2 server. I created a text file in Notepad with a single leading space followed by some text and that space was still present when I uploaded it to my IIS FTP server using ASCII transfer mode.