Samba+FreeBSD+OSX Finder
Tried to run Samba44 on FreeBSD to share files on the local network with OSX machines. Took me a while but I finally figured out that in order to get rid of the infamous ERROR -36 from the Mac Finder, you have to disable sendfile with:
use sendfile = no
As a matter of fact, let me post a complete working example of smb4.conf that works between my FreeBSD-hosted Samba and my Mac (Yosemite):
[global] # Following line is useful on Linux, not on FreeBSD apparently # socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072 realm=* max protocol=SMB3 winbind enum groups=yes winbind enum users=yes large readwrite = yes max xmit=32768 min receivefile size=2048 use sendfile = no aio read size = 2048 aio write size = 2048 write cache size = 1024000 read raw = yes write raw = yes getwd cache = yes unix charset = UTF-8 oplocks = yes workgroup = HOME server string = PO security = user map to guest = Bad User log level = 5 log file = /var/log/samba4/samba.log max log size = 50 interfaces = 192.168.0.0/16 hosts allow = 127.0.0.1 192.168.0.0/16 hosts deny = 0.0.0.0/0 #dns proxy = no # I do not want Samba to serve printers, thanks printing = bsd printcap name = /dev/null guest ok = yes guest account = nobody load printers = no printing = bsd printcap name = /dev/null disable spoolss = yes ea support = no # Share the directory in /data/share as 'share' [share] path = /data/share public = yes guest ok = yes writable = yes browsable = yes create mask = 0777 directory mask = 0777 force user = nobody follow symlinks = yes
In addition, OSX does not support guest access to an SMB server. The simplest solution I found was to set up a user called ‘nobody’ without password:
smbpasswd nobody -> Press ENTER twice to set no password
And then access your share by pointing your Mac Finder to smb://nobody@HOST/share and click Connect.
Note to self: never ever install a Samba server after 7pm if you want a full night sleep.
Leave a Reply