Discuss Apache can't read samba shares in the BSD Help forum on Dev Shed. Apache can't read samba shares BSD Help forum discussing all BSD based operating systems including FreeBSD, OpenBSD, NetBSD, and more. BSD refers to the distribution of UNIX originally developed by the University of California at Berkeley.
Receive the tools necessary to be the rock star of your field. Our 12-month program teaches you the evolving world of multi-channel marketing as well as the complex issues and opportunities found in the industry.
ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month! Download and Activate to enter!
Web development can be a daunting task, even for specialists. There is a lot of information to absorb and a lot of technologies to learn in order to manage a superior website. When trying to learn the ropes, developers need a reliable source to introduce new ideas that can be easily implemented. When working on large projects, even web veterans may run into a technology or an aspect of a technology that they are unfamiliar with.
Posts: 2
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
Posts: 1
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