2

When I backup my files using Filezilla, as soon as a file is downloaded, it has different file size with the original file size on the server. I am not sure if it is normal or a kind of virus or server compression? If it is a server-side compression where can I disable this setting so I can make a directory comparison using FTP softwares?

My website is wordpress and the shared hosting control panel is cPanel.

  • It has been years since I've used FTP. Do you have shell access with SSH as well? If so there are several checks you could do as well as downloading over SCP or rsync which would probably be more reliable. – Stephen Ostermiller Dec 2 at 14:53
  • This is not unusual. When I was a host, I routinely used FTP automatically using my robot server to copy backups to a file server for storage and the file sizes were always different. Uncompress the downloaded file to see if there are any problems with the download. Use shell to uncompress the file on your host server to see if there are any problems with the backup file on the server. If both uncompress and both sets of files are okay, then there is no problem. Cheers!! – closetnoc Dec 2 at 16:53
4

It isn't a virus or some sort of FTP compression.

It could be a couple of things going on:

For instance the server is likely running Linux and your desktop is likely running Windows. It is likely that your server and desktop are set to display file size differently.

In some operating systems, file sizes tend to be expressed mebibytes (e.g. 1 GiB = 1,024 MiB) while in other operating systems sizes are generally expressed in megabytes (e.g. 1GB = 1,000 MB). This shows the relationships between the two systems.

Another thing that could be going on is that some operating systems will sometimes report the "true file size" and some will tend to report the "file size on disk".

These can be different numbers based on the file allocation unit size of the hard drive, etc. When a hard drive is formatted with larger sized allocation units, there's more difference between the actual file size and the size on disk.

In a very "loose" example, if the allocation unit is 4kb a 10kb file will take up three blocks (or 12kb "on the disk"), but if the allocation unit is 8kb, the same 10kb file will take up two blocks (and be 16kb "on the disk") or if the allocation unit is 2kb, it will take up 5 blocks (and be 10kb on the disk)...

In either of these cases, as long as the files aren't corrupted, it's nothing to concern yourself with. It's just a "that's how it is" kind of situation.

FileZilla (and probably most other FTP programs) can be set to make the conversion automatically somewhere in the configuration dialogs. Here is a screenshot of my FileZilla configuration showing the pertinent settings. Yours may vary, but I'd suspect it's at least similar:

enter image description here

  • You nailed it! Cheers!! – closetnoc Dec 3 at 21:07
  • Thank you so much for detaield information about this case. I have voted up your answer but I let it open for a while to discuss more because I am not yet sure if there are also another reasons and aslo I can not confirm the exact case because I have no access to detailed configuration of the server. Thanks again. – Ali Sheikhpour Dec 3 at 21:34
  • Do you have access to a terminal ("SSH connection" or "command prompt") on the server? – Greg Nickoloff Dec 3 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.