Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently got a dedicated server and after migration to the new machine I started noticing problems with file transfers.

My FTP client, despite being set to auto, keeps uploading php files in binary mode and the content of those files is messed up.

Since I mostly upload files of different kinds it would be annoying to change from binary to ASCII every single time, beside, I never had such problems.

What could be the cause of this behavior?

My dedicated server runs CENTOS 6.4 and the ftp server is Pure-FTPd.

I tried different FTP clients and they all have the same problem so I assume is soem misconfiguration on the server side.


share|improve this question
The FTP client chooses the transfer mode, so you need to fix it on the client side. – Michael Hampton Jun 25 '13 at 19:51
I did, I always kept it set to auto, but now every php file is uploaded in binary mode, of course if I set the client to ASCII the file is uploaded correctly but when I transfer directories with php, html,png,gif,jpg or whatever extension it would be annoying no to have the client set to auto. or am I missing something? – Incognita Mundi Jun 25 '13 at 19:56
Any decent Windows/Mac FTP client will let you set the transfer mode explicitly based on file type/extension. – Michael Hampton Jun 25 '13 at 21:51
I know, this problem started happening the day I got all my files transferred to the new server, I tried different ftp clients all set to auto when uploading ascii and binary files, I checked that the client is set to transfer php extension in ascii (as it always was in the past) and in fact the settings are fine but when uploading these files it keeps transferring them binary. – Incognita Mundi Jun 25 '13 at 22:34
Is there a way to disable ASCII mode on the server side? – Tony Sep 14 '15 at 15:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.