BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old May 11th, 2004, 12:06 PM
geoffp geoffp is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 geoffp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old October 24th, 2004, 10:42 AM
technomax technomax is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 1 technomax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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:
Originally Posted by geoffp
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > Apache can't read samba shares


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway