• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Files getting corrupted after FTP transfer

Joey van Venrooij

New Pleskian
Hello,

When I upload a PHP file to my server via FTP all is fine and the website is working. But when I download it again the file is corrupted and there are characters like "styÐ% Ð% à¥" °£" 8% ð% @ ð% "

This only happens when I download the file with FTP and not with the file manager. If I upload the PHP file again the website won't work anymore because the server also can't interpreted the characters.

When I issue the command "file filename.php" it says:

file filename.php
filename.php: data

It works when I force the mode to be binary on the client side and when i forced binary mode it actually says the filetype correctly:

file filename.php
filename.php: HTML document, UTF-8 Unicode text
 
Last edited:
This is caused by the transfer type alone. When you upload in Binary mode and download in ASCII mode or upload in ASCII mode and download in Binary mode, line breaks are removed or added that you do not want to happen. A .php-file should be uploaded and downloaded in ASCII mode only, because it is a text file. Normally, in FTP clients you can set a list o file extensions that determines the transfer mode for different file types.
 
You would think that is true but when I upload and download them in ascii mode the files get corrupted. It only stays functional in binary mode. I think the proftpd doesn't support utf-8 unicode. But I couldn't find a fix for this.

This is caused by the transfer type alone. When you upload in Binary mode and download in ASCII mode or upload in ASCII mode and download in Binary mode, line breaks are removed or added that you do not want to happen. A .php-file should be uploaded and downloaded in ASCII mode only, because it is a text file. Normally, in FTP clients you can set a list o file extensions that determines the transfer mode for different file types.
 
Back
Top