Private Files and corrupted files Hello fellow Drupal expert, 

I'm in search of wisdom. Some said i can find it in here :)

Okay so here's my issue. We got an intranet and we'd like to have some privacy (if you know what i mean). We're using IMCE and a module called private_file_download_permission (so we can map our existing roles to folders). But nothing is working, we can set private folders (and control their access) but every file we upload (through IMCE)is being corrupted.

Let me explain cause i've found some interesting things. First, if i download my file through FTP it work well. But if i go through the website it is corrupted. So I looked around and find that when i open my file with a text editor there's 2 empty lines added to it and if i delete them the file goes back to normal. But remember this happen only when the file is put on a private folder (works fine on public ones).

Have you some idea of what kind of sorcery is going on ?

Sorry for my english, and thank you for your answer;
Rémi
Ok my colleague found the solution !!

There was 2 lines added at the start of our settings.php :

This thing added lines at our downloaded files and corrupted them  !!

Ok so thank you for your time :)