Comment 1 for bug 1916391

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the report.

I can confirm this behaviour. Here are the reproduction steps, assuming you're in a Focal VM:

# apt install samba apache2 curl cifs-utils
# cat << EOF >> /etc/samba/smb.conf
[testshare]
  path = /testshare
  browseable = yes
  read only = yes
  guest ok = yes
EOF
# mkdir /testshare
# dd if=/dev/random of=/testshare/test.data bs=1M count=1
# mount -t cifs -o guest //127.0.0.1/testshare /mnt
# sed -i 's@DocumentRoot.*@DocumentRoot /mnt\n\t<Directory /mnt>\n\t\tRequire all granted\n\t</Directory>' /etc/apache2/sites-enabled/000-default.conf
# systemctl restart apache2
# curl http://localhost/test.data -H 'Range: bytes=0-1'
curl: (1) Received HTTP/0.9 when not allowed

I marked the bug as Invalid because you can use "EnableMMAP Off" in order to get things working. I agree that this should perhaps be better documented, though.

Can you confirm whether "EnableMMAP Off" works in your case? Also, "EnableSendFile Off" may be needed as well.