InMotion Hosting Support Center

Occasionally, issues occur with files becoming corrupt when uploading through FTP. When viewing the corrupted file through the browser, the following error will be thrown.

"This image can not be displayed because it contains errors"

This is typically caused by uploading files through FTP as ASCII file transfer type. The "ASCII transfer type" will transfer the files as regular text files. The "Binary transfer type" will transfer the data in binary mode which handles the files as binary data instead of text data. Setting your FTP client to Binary will prevent your files from becoming corrupted through ftp transit. Please see the following on how to switch your FTP program to Binary.

It's also been brought to our attention that another possible cause of file corruption during FTP transfers, could be from your local firewall. Please also check for any updates to your firewall software, and possibly restart your router as well, if switching your FTP client settings to binary doesn't work.

Changing your ftp program to binary transfer

You can change the transfer type in your ftp program to Binary. All FTP programs should have this functionality. The following steps will demonstrate how to change the transfer type from ASCII to Binary in Filezilla.

  1. Open your Filezilla ftp program.
  2. Settings in FileZillaSelect "Edit" and click "Settings" from the drop Box.
  3. Transfer settings FileZillaIn the "Select page:" box, under "Transfers", click "File Types".
  4. Binary radio button FileZillaIn the "Default transfer type" section, select the "Binary" radio button.

    Click OK.

    Now when you connect to your server with ftp, files will be treated as Binary files. This should prevent the files from becoming corrupted.


Support Center Login

Social Media Login

   
Social Login Joomla

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2014-10-08 5:35 am
its fine
n/a Points
2014-10-23 8:05 am
Why if settings above are correct file is still corruption on destination server
Staff
21,102 Points
2014-10-23 11:23 am
Hello Philip,

Thank you for your question. We are happy to help, but will need some additional information.

Are you getting any errors?

You can enable logging in FileZilla, which can provide more details.
  1. Open fileZilla
  2. Go to Edit-->Settings
  3. In the File editing section, click Logging
  4. Check the Log to file box, and enter a file name.

You may want to try zipping the file first (to protect it from corruption), then uploading it via FTP. Then unzipping it once it is uploaded.

If you have any further questions, feel free to post them below.
Thank you,
John-Paul
n/a Points
2014-10-23 8:09 am

Although transfer setting in Filezilla, Winscp and MobaXterm were set to transfer a .mp4 file as binary to a remote server, and the file was transferred, it seemed to have been converted to ASCII.

How do I prevent this?

Could it be the setup of the remote server.

 

Staff
21,102 Points
2014-10-23 11:45 am
Hello Philip,

Thank you for your question. Transferring a file via binary, or ASCII should not convert the file in any way. It is just the means of transferring.

For example, it is like using Fedex, instead of UPS for shipping. In the end the package will be the same.

How are you viewing the file? Can you provide a link to it?

Thank you,
John-Paul
n/a Points
2015-01-23 2:20 pm

Hi,

I have a couple of 1GB .mov file which after FTP download are damaged. Each stopps playing in the middle of the file.

Any advise how to fix it? Is it FTP settings which is causing it?

Thanks,megan

 

Staff
33,905 Points
2015-01-23 2:23 pm
Hello Megan,

Have you had any luck by switching to Binary transfer?

Kindest Regards,
Scott M
n/a Points
2015-06-01 5:08 am

Hi,

I am also facing the same issue even after the settings are made to Binary the file when downloaded and unzipped gets corrupt I have tried it multiple times assuming the file didnt download properly but its still keeps on getting corrupt.

Is there any other setting that needs to be checked I have verified the filesize when uploaded is the same and after download also the file size is same. But when unzipped the file it is found corrupted.

 

Regards

Sam

Staff
33,905 Points
2015-06-01 2:36 pm
Hello Sam,

Have you tried the instructions above for switching on the logging in FileZilla?

Kindest Regards,
Scott M
n/a Points
2015-06-03 5:20 am

Yes I tried setting it to Binary but no luck the files keep on corrupting when downloaded intermittently.

Is there any other settings that can be tried out

 

Regards

Sam

 

Staff
30,062 Points
2015-06-03 3:51 pm
Hello Sameer,

The reason for turning ON the logging is to see if something is happening during the transfer. Have you checked the log file to see if any messages or errors are being recorded? You need to go to EDIT > Settings and then select LOGGING to see the location of your log file. The issue is most likely dropped data causing the file to become corrupt - but we would need know if it's happening to see if we can do anything about it. The log file helps us to identify possible issues. Please let us know if the log file caught anything.

regards,
Arnel C.
n/a Points
2015-10-01 1:37 pm

I have a shell script that does logarchive from remote build linux server on all the production linux servers .  This script runs nightly.  Duirng this process, the log files on the production linux servers are changing to binary format and since this is production environment, cannot restart the servers.  Is there a way to fix this.  The line that basically does the logArchive in my script is below.

ssh weblogic@$SERVERNAME cat \/dev\/null \> \/home\/weblogic\/$DOMAIN\/$RMTLOGFILE

I can provide the entire script for reference.

 

 

Staff
21,102 Points
2015-10-01 2:42 pm
Hello sree,

Thank you for contacting us. Yes, can you provide the entire script for reference? This will help us narrow down the cause of the problems.

Thank you,
John-Paul
n/a Points
2015-10-01 11:07 pm

Hi John,

 

Please find my script below.

 

TODAY=`date +%Y%m%d`

SCRIPT_CONFIG=~/script-config

LOGARCHIVE=/logArchive

ROTATE_LOG=$LOGARCHIVE/rotate.log

 

for SERVER in `cat $SCRIPT_CONFIG/log-rotate.properties`;do

        echo

        SERVERNAME=`echo $SERVER | awk -F '|' '{ print $1 }'`

        DOMAIN=`echo $SERVER | awk -F '|' '{ print $2 }'`

        RMTLOGFILE=`echo $SERVER | awk -F '|' '{ print $3 }'`

        LOGFILE=`echo $SERVER | awk -F '|' '{ print $3 }'`

 

        if [ `ls $LOGARCHIVE/$SERVERNAME/$DOMAIN/ | grep $LOGFILE.$TODAY | wc -l` > 1 ];then

           NUMFILES=`ls $LOGARCHIVE/$SERVERNAME/$DOMAIN/ | grep "$LOGFILE.$TODAY" | wc -l`

           LOGFILE=$LOGFILE.$TODAY.$(($NUMFILES + 1))

        else

           LOGFILE=$LOGFILE.$TODAY

        fi

 

        echo "`date` : scp -p weblogic@$SERVERNAME:/home/weblogic/$DOMAIN/$RMTLOGFILE $LOGARCHIVE/downloadtmp/$LOGFILE" >> $ROTATE_LOG

        scp -p weblogic@$SERVERNAME:/home/weblogic/$DOMAIN/$RMTLOGFILE $LOGARCHIVE/downloadtmp/$LOGFILE >> $ROTATE_LOG

 

        if [ $? == 0 ];then

                ssh weblogic@$SERVERNAME cat \/dev\/null \> \/home\/weblogic\/$DOMAIN\/$RMTLOGFILE

                mv $LOGARCHIVE/downloadtmp/$LOGFILE $LOGARCHIVE/$SERVERNAME/$DOMAIN/$LOGFILE

                #echo "mv $LOGARCHIVE/downloadtmp/$LOGFILE $LOGARCHIVE/$SERVERNAME/$DOMAIN/$LOGFILE"

                gzip $LOGARCHIVE/$SERVERNAME/$DOMAIN/$LOGFILE

        else

                log "Failed to download $SERVERNAME:/home/weblogic/$DOMAIN/$RMTLOGFILE"

        fi

        echo

done

 

Staff
21,102 Points
2015-10-02 12:18 pm
Hello sree,

Thank you for contacting us. We spent some time looking into this, and recommend using rsync command instead.

Thank you,
John-Paul

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

16 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!