FileZilla ASCII and line endings
I've tried my small share of FTP programs, among them Filezilla. Thing is, I like to upload in secure mode (e.g., SFTP) when at all possible. And, while I loved Filezilla's ability to upload files utilizing PuTTY (that is, securely), I also noticed a problem when uploading .cgi scripts — namely, Perl scripts would stop working. Which you wouldn't necessarily notice for a while. :(
I finally discovered that, in secure mode, Filezilla was adding line endings to the lines of code, thereby rendering them invalid. I discovered this by SSHing in (with Putty) and editing the files via VI. This is what I saw:
line of code^M
line of code^M
… ad infinitum. While one *could* edit the files with VI to remove the line endings, that's hardly a convenient solution; no, uploading and being done with it is the convenient solution in my book.
I'd seen this seeming solution at Ringlink.org:
Personally I have just noticed that sometimes "ASCII transfer mode" does not work, and my own 'solution' is to ensure with my text editor that the files are saved in Unix mode *before* the transfer to the Unix environment.
This is in my opinion too much hassle. Text editors (I use NoteTab Pro) normally save in non-Windows no-line-endings mode; it's Filezilla in secure mode that was adding them. Upload a file in Filezilla — line endings. Upload the same unchanged file in a normal FTP program — no line endings. End of story.
Actually, the real end of the story is that I had switched from WS_FTP Pro because it had the same line-endings problems when uploading in secure mode. However, the latest versions do not. That's the end of the story, or at least, my story. :)
Added: Excellent series of pages from Indiana University regarding FTP and Mac and UNIX line endings
6 Comments to "FileZilla ASCII and line endings"
Have your say ...
First-time comments will be held for moderation (but comments are appreciated). Otherwise, just be courteous. If your name is a bunch of keywords, your comment will be deleted. Don't post links unless highly pertinent. Posters must be 16 or older.