Samba or Apache issue? (solved)

Allen Chen achen at harbourfrontcentre.com
Thu Apr 9 22:16:55 UTC 2009


Allen Chen 写道:
> m.roth2006 at rcn.com ??:
>> Allen,
>>
>>> Date: Thu, 09 Apr 2009 11:31:43 -0500
>>> From: Allen Chen <achen at harbourfrontcentre.com>
>>> I have a samba 2.0.22 and a apache 2.2.3 running on a separate RHEL4
>>> machine.
>>> If I change apache DocumentRoot to a mounted samba share, I cannot see
>>> any static pages or files(images,css..) show up in broswer.In global
>>> settings of httpd.conf, if I use EnableMMAP off and EnableSendfile off
>>> options, this only changes apache access_log info from
>>> "GET /mypage/test.html HTTP/1.1" 206 1106
>>> to
>>> "GET /mypage/test.html HTTP/1.1" 200 -
>>>
>>> But any php page works fine. It looks like apache doesn't like mounted
>>> samba share. Any idea?
>>
>> What's the ownership and permissions on the samba share, and are they 
>> the same as who apache's running as?
>>
>> mark
>>
> Apache is running as nobody/nobody and all files&folders have 
> nobody/nobody as the ownership.
> I think there is no permissions issue. Because php page works fine in 
> the same folder.
> I have worked with samba and apache for 5 yrs. This is my first time 
> to use
> a mounted samba share as the DocumentRoot. I googled and found it is 
> ralated to the httpd.conf:
>
> #
> # EnableMMAP and EnableSendfile: On systems that support it,
> # memory-mapping or the sendfile syscall is used to deliver
> # files. This usually improves server performance, but must
> # be turned off when serving from networked-mounted
> # filesystems or if support for these functions is otherwise
> # broken on your system.
> #
> EnableMMAP off
> EnableSendfile off
>
> Samba log has no error message.
>
> Has anybody ever used mounted samba share as DocumentRoot for apache?
>
>
> Allen
just reply to myself.
When I chenge mount option from:
mount -t cifs -o ......
to
mount -t smbfs -o .....
It works perfect. So it is samba mount issue. Can anybody explain this?
or Is cifs too new to use from RHEL4? After a deep dig, I found that
if I mount it with cifs and restart apache and broswer a couple of pages,
some of the files get messed(extra code is appended to the end of the file).
but the original files on samba side are OK.

samba info:
samba server: compiled samba 2.0.22
apache server: samba-client-3.0.10-1.4E(comes with RHEL4 rpm)


cheers,




More information about the redhat-list mailing list