# RESOLVED:  Apache2 upgrade + smb mount = zero byte downloads

## RosenSama

I keep my MP3 files available on a password-protected site using Apache 1.3.x for a while now.  I recently decided to move up to Apache 2.0.x and I've come across a problem I can't figure out.

I'm now running Apache 2.0.47.  I have my MP3 files on a Win 2k share that I mount read-only at /mnt/mp3.  In /home/httpd/htdocs I have a symbolic link "music" to the mounted share.  

When I try to download an MP3 from that link I get a zero byte file.  Here's an example of a wget.  This used to work fine with Apache 1.3.x

```

wget http://www.mydomain.com/music/goodmusic.mp3

--00:39:44--  http://www.mydomain.com/music/goodmusic.mp3

           => `goodmusic.mp3'

Resolving www.mydomain.com... done.

Connecting to www.mydomain.com[xxx.xxx.xxx.xxx]:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 3,264,370 [audio/mpeg]

 0% [                                                                                         ] 0             --.--K/s    ETA --:--

00:39:44 (0.00 B/s) - Connection closed at byte 0. Retrying.

```

Note that it gets an HTTP response code of 200 and the correct size for the file, but nothing is returned past zero bytes.

If I make a symbolic link in the same directory to an MP3 on the local file system, it downloads correctly.  

I can play the file with MP3 players via the symbolic link using the path /home/httpd/htdocs/music/goodmusic.mp3, but not via the URL.

I've checked that FollowSymLinks is set in apache configuration and I think the fact that Apache returns the correct file size verifies this.  

I'm out of ideas.  Any suggestions?Last edited by RosenSama on Fri Oct 24, 2003 7:57 pm; edited 3 times in total

----------

## RosenSama

Bump.

Can anyone even recommend somewhere else I could post this with hope of getting responses?

----------

## RosenSama

I have tried some further experiments.  I removed the symlink and created an empty directory of the same name ( /home/httpd/htdocs/music ) and I added the following to my apache configuration:

```

        Alias "/music" "/mnt/mp3"

        <Directory "/mnt/mp3">

                Options Indexes

                <IfModule mod_access.c>

                        Order allow,deny

                        Allow from all

                </IfModule>

        </Directory>

```

Note that I enabled Indexes.  Now, when I point my browser at it, I receive the index pages.  They have all the correct file listings,  including file size.  But . . . I still cannot down load an mp3.  I get the same result:

HTTP 200 OK

0 byte download

So, symbolic links have nothing to do with it.  

I only have this problem downloading the file from a directory on an smbfs network mount.  Everything works fine for local files.  I don't have any other network file systems available for testing.  

Does this spark any ideas?

----------

## thecooptoo

alt.apache.config

----------

## RosenSama

The solution as provided on the users@httpd.apache.org mailing list.   Thanks Josh.

http://httpd.apache.org/docs-2.0/faq/error.html#error.sendfile

----------

## val

^^^^ I tried that solution and it didn't help.  Do I need mod_mp3 or something?

nevermind.  I just figured out it's an xmms problem.  :Confused: 

----------

