Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


  1. A Windows and a Ubuntu Server are hosted in VMware ESXi
  2. I have a a 6GB file on a Windows share
  3. The Windows share is mount on Ubuntu with smbmount
  4. A symlink pointing to the 6GB file is created in a public_html directory, which is readable by Apache

The problem:

  1. wget gets an error Connection closed at byte 2130706432. Retrying. after downloading 2130706432 bytes (exactly 2032 MiB, and is the same every time)
  2. Apache returns 206 Partial Content without showing any errors in the log
  3. Same error even if I download from localhost
  4. Similar error when Firefox is used instead of wget
  5. No error if I md5sum or cp the file on Ubuntu, suggesting that smbmount and the Windows Server are OK with 6GB files.
  6. No error if Apache serve a 6GB file from the local disk, suggesting that Apache has no problems handling 6GB files.

Any ideas why Apache/symlink/smbmount/Windows would cause an error when used together? How can I fix the problem?

Software used:

  • VMware ESXi 4 Update 1
  • Windows Server 2008 R2
  • Ubuntu 8.04 Server, vmxnet3
  • Apache 2.2.8
  • mount.cifs 1.10-3.0.28a (as returned by smbmount -V)

Edit: If I use CentOS 4.8 x64 instead of Ubuntu 8.04, Apache will disconnect at byte 2147483647 (2GiB - 1byte) instead of 2130706432 (2GiB - 16MiB).

share|improve this question
Is your Ubuntu VM running a 32 or 64 bit version of Ubuntu? – Zoredache Mar 23 '10 at 23:27
What if you mount the share within the Web tree instead of using the symlink? – Warner Mar 24 '10 at 5:06
Are you sure you are mounting CIFS and not SMB? – Dan Andreatta Mar 24 '10 at 10:10
@Dan: CIFS and SMB are the same thing – Zypher Mar 26 '10 at 23:18
@Warner: Thanks for you suggestion, unfortunately the same error occurs – netvope Mar 27 '10 at 3:14
up vote 1 down vote accepted

I had a similar problem where I worked, check out this bug report. The issue seems to be with EnableSendfile, so put this in your Apache config for the virtual host or global config:

EnableSendfile Off

share|improve this answer
THANKS A LOT!! That is the answer! – netvope Apr 17 '10 at 17:16

I'm pretty sure it's actually a problem with your Windows share, you need to set the block size to 4k and allow it to share it in a way that can be interpreted correctly by a client. Unfortunately this may require a volume reformat sorry.

share|improve this answer
The NTFS block size is 4KB on my Windows share. Is that what you're talking about? – netvope Mar 27 '10 at 3:05

Why don't you use a different method of distributing a file? 6GiB is a lot, and without a MD5sum check, it could be error proned. Is delivery via a distributed system possible in this case?

share|improve this answer

You mentioned smbmount as how the cifs share is mounted. smbmount and mount.cifs are 2 different animals. smbmount has a 2GB limit on files for one. But smbmount is old way of doing it and has been replaced by mount.cifs.

share|improve this answer
When I run smbmount -V, I got mount.cifs version: 1.10-3.0.28a, so I think my version of smbmount is already using mount.cifs. Also note that md5sum and cp have no problem reading the 6GB file via smbmount. – netvope Mar 31 '10 at 2:35
I guess they must be symlinking smbmount to mount.cifs nowadays. – 3dinfluence Mar 31 '10 at 3:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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