Group: comp.os.linux.networking
From: Jack Snodgrass
Date: Tuesday, March 11, 2008 12:35 PM
Subject: Re: Apache not serving from CIFS-mounted share, works if it's mounted as SMBFS

On Tue, 11 Mar 2008 09:34:41 -0700, Rick Onanian wrote:

> I'd like to mount a windows 2000 server fileshare on an linux/apache
> server to do some basic web serving. The web server works fine and
> shows other content that's stored locally just fine.
>
> This works:
> mount -t smbfs -o username=smbusername,uid=apache,ro //server/share
> mountpoint/
> but it complains that smbfs is deprecated and I should be using cifs.
> For now, I'm using it anyway.
>
> This seems to work:
> mount.cifs //server/share mountpoint/ -
> ouser=smbusername,uid=apache,ro
> but it won't serve actual files. It allows browsing of the directories
> and shows the filenames. It does not return an error, it just does not
> send the file. I have confirmed that user 'apache' can read the file
> by logging in as that user and viewing the file.
>
> I tried a telnet test, using GET and Host commands captured from
> firefox's LiveHTTPHeaders extension, like this:
> -=-
> telnet webserver 80
> GET /directory/filename.jpg HTTP/1.1
> Host: webserver
> -=-
>
> The result looks like this:
> -=-
> HTTP/1.x 200 OK
> Date: Tue, 11 Mar 2008 15:51:07 GMT
> Server: Apache/2.2.4 (Unix) PHP/5.2.0
> Last-Modified: Thu, 21 Feb 2008 16:07:30 GMT
> Etag: "420f8a5-180bf4-4d7a7480"
> Accept-Ranges: bytes
> Content-Length: 1575924
> Keep-Alive: timeout=5, max=100
> Connection: Keep-Alive
> Content-Type: image/jpeg
>
> Connection to host lost.
> -=-

what does the apache error log show ( if anything ).
What does the apache log file show for the filename.jpg file?
If you get a good return code in the apache log... does the bytes
sent match the file size?

Does it work with smaller files and just not larger files.
Can you do cp filename.jpg /tmp and have it get copied correctly?

what does wget -O erase.me "http://127.0.0.1/directory/filename.jpg"
give you when you run it from your webserver. does the erase.me
file have the correct number of bytes when the transfer completes?


Just wondering if the web server is having access files for 'large'
files or files after 'x' bytes and your just not seeing it getting
a directory index listing.




--
D.A.M. - Mothers Against Dyslexia

see http://www.jacksnodgrass.com for my contact info.

jack - Grapevine/Richardson

Safety Articles | Usenet Groups | Usenet News | Bluegrass