大网数据广告活动
网站运营与故障问答

Website backup file size differs on server vs when downloaded via FTP

· 52CE 我爱测

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 ser…

问题原文

原帖链接 · Ali Sheikhpour · CC BY-SA 4.0

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.

社区高分解答

原帖链接 · gnicko · CC BY-SA 4.0

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

It could be a couple of things going on:

For example, if the server is running Linux and your desktop is running Windows it is likely that your server and desktop are set to display file sizes 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:

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2019-12-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。