0

I'm running a RHEL machine that was, by default, running vsftpd, the very secure ftp daemon. Due to its lack of configuration and symlink support, I've switched to pure-ftpd.

I noticed that files that used to have linefeeds \n now instead have two carriage returns \r.

I've tried switching back in forth between the servers, and the file is untouched, but it seems that the FTP server is doing something different. Using vi/vim as well as cat show a single linefeed, but the downloaded file from pure-ftpd shows two carriage returns. Note that this applied only to certain files, many files transfer normally, including all system-created files.

What causes this to happen? If this isn't a setting, how would I fix the files without opening them one by one and replacing \r\r with \n?

1 Answer 1

5

You need to tell your client to transfer in binary mode.

2
  • One question - why would this change between FTP server types if this is a client-side option? May 24, 2013 at 6:40
  • It's a negotiated option. I believe the default is set by the server, but I'm not sure of that. May 24, 2013 at 7:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .