|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Apache can't read samba shares
On my freebsd machine I've set up both Apache and samba. I mounted a folder from my windows machine to /usr/local/www/data/papers that I'd like to be able to browse from the web and download from.
I can access the mounted share from freebsd just fine, and I can open and read the files. Through the web I can access the share, and browse the folder and all subfolders just fine. The problem is when I try to download something through the web. If I click on something, nothing happens. If I right click and choose "save target as" it fails, giving me a 0 byte file. This only happens in the shared folder. I'm a bit of a nix newb, as I've only had freebsd installed a few weeks now. But my guess is that either there is some incompatibility between apache and samba shares, which doesn't sound right, or the apache user (www) does not have permissions to read any of the files in the share. But nothing i try seems to work. I've tried setting www as admin, I've tried creating a usermap, but am unsure of what to put, so I tried many different combinations, and I've tried adding www to different groups in /etc/group and vice versa. Nothing seems to work. I'm not even sure that's the problem, as all my other users are able to read files there just fine, the share doesn't require any passwords to log in or anything Does anyone know what might be the problem? Here's my smb.conf [global] workgroup = WORK1 netbios name = BSDCOM interfaces = 192.168.1.20/24 encrypt passwords = Yes username map = /usr/local/etc/usermap.txt admin users = www [papers] path = /usr/local/www/data/papers read only = No |
|
#2
|
|||
|
|||
|
Hi...
this worked for me, so maybe you'll have similar success: Make sure you have your apache 2 upgraded (I think anything equal or above 2.0.44 should work). Then in httpd.conf, add the directives: EnableMMAP Off EnableSendfile Off now, do a: apachectl -k restart and you should be golden! also, if this works for you, you can consider moving these directives under the <Directory> entry that describes your SAMBA mapped dir. that way, you won't slow down the rest of your webserving that is being done off of local (static) directories, and can therefore benefit from memory-mapping and kernel send support. Hope it helps! ~techno Quote:
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > Apache can't read samba shares |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|