# Global parameters [global] workgroup = LINUXSERVER server string = ARCHLINUX netbios name = ARCHLINUX server role = standalone # security security = user dns proxy = no # hosts allow does not seem to work with samba4 # hosts allow = 192.168.1. 192.168.2. 127. # hosts allow = 192.168.1. 127. # logging log file = /var/log/samba/samba.log.%m max log size = 50 log level = 1 passdb:1 auth:1 winbind:1 # do not following symlinks to a file / directory outside the samba share (wide links = no), both default # follow symlinks = yes # wide links = no # if unix extensions = yes (default) the real unix rights and permissions are used for the files and folders unix extensions = no # charset has to be set matching the system locale # localectl status # locale unix charset = UTF-8 mangled names = no # experimental multi channel support server multi channel support = yes # solving colord warnings at boot by disabling samba printer sharing #load printers = no #printing = bsd #printcap name = /dev/null #printing = cups #printcap name = cups #disable spoolss = yes # defining the samba stack (osx 10.9 uses smb2, osx 10.10 uses smb3 as default) # server max protocol = SMB3 # server min protocol = SMB3 # client max protocol = SMB3 # client min protocol = SMB3 ### ### performance tuning ### # FORCE THE DISK SYSTEM TO ALLOCATE REAL STORAGE BLOCKS WHEN # A FILE IS CREATED OR EXTENDED TO BE A GIVEN SIZE. # THIS IS ONLY A GOOD OPTION FOR FILE SYSTEMS THAT SUPPORT # UNWRITTEN EXTENTS LIKE XFS, EXT4, BTRFS, OCS2. # IF YOU USE A FILE SYSTEM THAT DOES NOT SUPPORT UNWRITTEN # EXTENTS, SET "strict allocate = no". # strict allocate = yes # WHEN "strict locking = no", THE SERVER PERFORMS FILE LOCK # CHECKS ONLY WHEN THE CLIENT EXPLICITLY ASKS FOR THEM. # WELL-BEHAVED CLIENTS ALWAYS ASK FOR LOCK CHECKS WHEN IT IS # IMPORTANT, SO IN THE VAST MAJORITY OF CASES, # "strict locking = auto" OR "strict locking = no" IS ACCEPTABLE. # strict locking = no # TCP_NODELAY: # SEND AS MANY PACKETS AS NECESSARY TO KEEP DELAY LOW # IPTOS_LOWDELAY: # [Linux IPv4 Tweak] MINIMIZE DELAYS FOR INTERACTIVE TRAFFIC # SO_RCVBUF: # ENLARGE SYSTEM SOCKET RECEIVE BUFFER # SO_SNDBUF: # ENLARGE SYSTEM SOCKET SEND BUFFER # socket options = TCP_NODELAY IPTOS_LOWDELAY # socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536 # SMBWriteX CALLS GREATER THAN "min receivefile size" WILL BE # PASSED DIRECTLY TO KERNEL recvfile/splice SYSTEM CALL. # TO ENABLE POSIX LARGE WRITE SUPPORT (SMB/CIFS WRITES UP TO 16MB), # THIS OPTION MUST BE NONZERO. # THIS OPTION WILL HAVE NO EFFECT IF SET ON A SMB SIGNED CONNECTION. # MAX VALUE = 128k # min receivefile size = 16384 # USE THE MORE EFFICIENT sendfile() SYSTEM CALL FOR EXCLUSIVELY # OPLOCKED FILES. # NOTE: ONLY FOR CLIENTS HIGHER THAN WINDOWS 98/Me # use sendfile = yes # makes problems when overwriting complete folders, files can be missing # do not use this if you don't really need it # This boolean option tells smbd whether to issue oplocks (opportunistic locks) to file open requests on this share. # The oplock code can dramatically (approx. 30% or more) improve the speed of access to files on Samba servers. # It allows the clients to aggressively cache files locally and you may want to disable this option for unreliable network environments (it is turned on by default in Windows NT Servers). # oplocks = no # The value of the parameter (a decimal integer) represents the number of minutes of inactivity before a connection is considered dead, and it is disconnected automatically. # The deadtime only takes effect if the number of open files is zero. # deadtime = 15 # If this integer parameter is set to non-zero value, Samba will create an in-memory cache for each oplocked file (it does not do this for non-oplocked files). # All writes that the client does not request to be flushed directly to disk will be stored in this cache if possible. # The cache is flushed onto disk when a write comes in whose offset would not fit into the cache or when the file is closed by the client. # Reads for the file are also served from this cache if the data is stored within it. # for a 256k cache size per file # write cache size = 262144 # This option controls the maximum packet size that will be negotiated by Samba. # The default is 16644, which matches the behavior of Windows 2000. A value below 2048 is likely to cause problems. You should never need to change this parameter from its default value. # max xmit = 65536 #### obihoernchen # oplocks = no # level2 oplocks = no # socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536 # write cache size = 131072 ## getwd cache = yes # min receivefile size = 16384 # max xmit = 65536 ### eggplant # THIS IS ONLY A GOOD OPTION FOR FILE SYSTEMS THAT SUPPORT # UNWRITTEN EXTENTS LIKE XFS, EXT4, BTRFS, OCS2. # strict allocate = yes # socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072 # min receivefile size = 16384 # use sendfile = yes ## read raw = yes ## write raw = yes # strict locking = No ### calomel # socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536 ## strict sync = no ## sync always = no # tweaking default values # finding out the default values # testparm -v # use sendfile = no # socket options = TCP_NODELAY # max xmit = 16644 # log level = 2 # syslog = 1 # getwd cache = yes # deadtime = 0 # read raw = yes # write raw = yes # strict allocate = no # oplocks = yes # level2 oplocks = yes # write cache size = 0 # min receivefile size = 0 # max xmit = 16644 # strict locking = auto # strict sync = no # sync always = no [office] ### specific share configurations comment = office path = /data/office force group = +officesmbuser valid users = @officesmbuser ### general share configurations writeable = yes guest ok = no ### masks and permissions create mask = 0770 directory mask = 0770 force create mode = 0770 force directory mode = 0770 ### more config options nt acl support = no inherit owner = yes case sensitive = yes map archive = no ### vfs objects (all in one line or not all will be activated, test with testparm) vfs objects = catia fruit streams_xattr recycle ### vfs_xattr config # acl_xattr:ignore system acls = yes ### vfs_fruit config ea support = yes store dos attributes = yes # fruit:resource = file # fruit:metadata = netatalk # fruit:locking = none # default fruit:encoding = private # without setting to native some characters as double quotes, pipe and asterisk will appear as unicode box locally on server after copying from macos client fruit:encoding = native # fruit:aapl = yes # readdir_attr:aapl_rsize = true # readdir_attr:aapl_finder_info = true # readdir_attr:aapl_max_access = true # fruit:nfs_aces = yes fruit:veto_appledouble = no ### fruit testing # fruit:copyfile = yes ### vfs_streams_xattr config # streams_xattr:prefix = user. # streams_xattr:store_stream_type = no ### vfs_recycle config # separate samba trash for every share in the shares root directory # vfs object = recycle recycle:repository = _trash/%U recycle:directory_mode = 0770 recycle:subdir_mode = 0770 recycle:keeptree = yes recycle:touch = yes recycle:versions = yes recycle:maxsize = 0 recycle:exclude = ?~$*,~$*,._*,.smbdelete*,*.*.sb-*,*~*.idlk recycle:exclude_dir = _trash ### appledouble and .DS_STORE # preventing .DS_Store files from being created by osx clients # already configured on osx clients with # defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true veto files = /.DS_Store/._.DS_Store/ delete veto files = yes # preventing ._ and .DS_Store files from being created by osx clients brings problems with folders odr files copied to the volume or synced via rsync # veto files = /._*/.DS_Store/ # delete veto files = yes [extra] ### specific share configurations comment = extra path = /data/extra force group = +extrasmbuser valid users = @extrasmbuser ### general share configurations writeable = yes guest ok = no ### masks and permissions create mask = 0770 directory mask = 0770 force create mode = 0770 force directory mode = 0770 ### more config options nt acl support = no inherit owner = yes case sensitive = yes map archive = no ### vfs objects (all in one line or not all will be activated, test with testparm) vfs objects = catia fruit streams_xattr recycle ### vfs_xattr config # acl_xattr:ignore system acls = yes ### vfs_fruit config ea support = yes store dos attributes = yes # fruit:resource = file # fruit:metadata = netatalk # fruit:locking = none # default fruit:encoding = private # without setting to native some characters as double quotes, pipe and asterisk will appear as unicode box locally on server after copying from macos client fruit:encoding = native # fruit:aapl = yes # readdir_attr:aapl_rsize = true # readdir_attr:aapl_finder_info = true # readdir_attr:aapl_max_access = true # fruit:nfs_aces = yes fruit:veto_appledouble = no ### fruit testing # fruit:copyfile = yes ### vfs_streams_xattr config # streams_xattr:prefix = user. # streams_xattr:store_stream_type = no ### vfs_recycle config # separate samba trash for every share in the shares root directory # vfs object = recycle recycle:repository = _trash/%U recycle:directory_mode = 0770 recycle:subdir_mode = 0770 recycle:keeptree = yes recycle:touch = yes recycle:versions = yes recycle:maxsize = 0 recycle:exclude = ?~$*,~$*,._*,.smbdelete*,*.*.sb-*,*~*.idlk recycle:exclude_dir = _trash ### appledouble and .DS_STORE # preventing .DS_Store files from being created by osx clients # already configured on osx clients with # defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true veto files = /.DS_Store/._.DS_Store/ delete veto files = yes # preventing ._ and .DS_Store files from being created by osx clients brings problems with folders odr files copied to the volume or synced via rsync # veto files = /._*/.DS_Store/ # delete veto files = yes [scripts] ### specific share configurations comment = scripts path = /data/scripts force group = +extrasmbuser valid users = @extrasmbuser ### general share configurations writeable = yes guest ok = no ### masks and permissions create mask = 0770 directory mask = 0770 force create mode = 0770 force directory mode = 0770 ### more config options nt acl support = no inherit owner = yes case sensitive = yes map archive = no ### vfs objects (all in one line or not all will be activated, test with testparm) vfs objects = catia fruit streams_xattr recycle ### vfs_xattr config # acl_xattr:ignore system acls = yes ### vfs_fruit config ea support = yes store dos attributes = yes # fruit:resource = file # fruit:metadata = netatalk # fruit:locking = none # default fruit:encoding = private # without setting to native some characters as double quotes, pipe and asterisk will appear as unicode box locally on server after copying from macos client fruit:encoding = native # fruit:aapl = yes # readdir_attr:aapl_rsize = true # readdir_attr:aapl_finder_info = true # readdir_attr:aapl_max_access = true # fruit:nfs_aces = yes fruit:veto_appledouble = no ### fruit testing # fruit:copyfile = yes ### vfs_streams_xattr config # streams_xattr:prefix = user. # streams_xattr:store_stream_type = no ### vfs_recycle config # separate samba trash for every share in the shares root directory # vfs object = recycle recycle:repository = _trash/%U recycle:directory_mode = 0770 recycle:subdir_mode = 0770 recycle:keeptree = yes recycle:touch = yes recycle:versions = yes recycle:maxsize = 0 recycle:exclude = ?~$*,~$*,._*,.smbdelete*,*.*.sb-*,*~*.idlk recycle:exclude_dir = _trash ### appledouble and .DS_STORE # preventing .DS_Store files from being created by osx clients # already configured on osx clients with # defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true veto files = /.DS_Store/._.DS_Store/ delete veto files = yes # preventing ._ and .DS_Store files from being created by osx clients brings problems with folders odr files copied to the volume or synced via rsync # veto files = /._*/.DS_Store/ # delete veto files = yes # # #