Samba: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
smb.conf | smb.conf | ||
<pre> | |||
[global] | |||
workgroup = WORKGROUP | |||
server string = %h | |||
server role = standalone server | |||
# SMB protocol | |||
server min protocol = SMB2 | |||
server max protocol = SMB3 | |||
# macOS compatibility | |||
vfs objects = fruit streams_xattr | |||
fruit:metadata = stream | |||
fruit:posix_rename = yes | |||
fruit:veto_appledouble = no | |||
fruit:delete_empty_adfiles = yes | |||
fruit:wipe_intentionally_left_blank_rfork = yes | |||
# Stability | |||
aio read size = 1 | |||
aio write size = 1 | |||
strict locking = no | |||
durable handles = yes | |||
kernel oplocks = no | |||
kernel share modes = no | |||
# Performance tuning for Windows | |||
socket options = TCP_NODELAY IPTOS_LOWDELAY | |||
use sendfile = yes | |||
min receivefile size = 16384 | |||
# Networking | |||
interfaces = 127.0.0.0/8 ens192 | |||
bind interfaces only = yes | |||
# Permissions | |||
inherit permissions = yes | |||
unix extensions = no | |||
map to guest = Bad User | |||
[storage] | |||
comment = Storage | |||
path = /storage | |||
browseable = yes | |||
writable = yes | |||
read only = no | |||
valid users = storage '''username''' | |||
force user = nobody | |||
force group = nogroup | |||
# FORCE permissions regardless of client umask | |||
force create mode = 0777 | |||
force directory mode = 2777 | |||
create mask = 0777 | |||
directory mask = 2777 | |||
nt acl support = no | |||
# Inherit parent permissions | |||
inherit permissions = yes | |||
inherit acls = yes | |||
follow symlinks = yes | |||
wide links = yes | |||
[TimeMachine] | |||
comment = Time Machine Backup | |||
path = /mnt/timemachine | |||
browseable = no | |||
hide unreadable = yes | |||
access based share enum = yes | |||
writable = yes | |||
read only = no | |||
# Time Machine requirements | |||
vfs objects = fruit streams_xattr | |||
fruit:time machine = yes | |||
fruit:time machine max size = 5000G | |||
fruit:model = MacSamba | |||
# Security (REQUIRED) | |||
guest ok = no | |||
valid users = '''username''' | |||
</pre> | |||
[[Category:Linux]] | [[Category:Linux]] | ||
Revision as of 23:45, 22 March 2026
smb.conf
[global] workgroup = WORKGROUP server string = %h server role = standalone server # SMB protocol server min protocol = SMB2 server max protocol = SMB3 # macOS compatibility vfs objects = fruit streams_xattr fruit:metadata = stream fruit:posix_rename = yes fruit:veto_appledouble = no fruit:delete_empty_adfiles = yes fruit:wipe_intentionally_left_blank_rfork = yes # Stability aio read size = 1 aio write size = 1 strict locking = no durable handles = yes kernel oplocks = no kernel share modes = no # Performance tuning for Windows socket options = TCP_NODELAY IPTOS_LOWDELAY use sendfile = yes min receivefile size = 16384 # Networking interfaces = 127.0.0.0/8 ens192 bind interfaces only = yes # Permissions inherit permissions = yes unix extensions = no map to guest = Bad User [storage] comment = Storage path = /storage browseable = yes writable = yes read only = no valid users = storage '''username''' force user = nobody force group = nogroup # FORCE permissions regardless of client umask force create mode = 0777 force directory mode = 2777 create mask = 0777 directory mask = 2777 nt acl support = no # Inherit parent permissions inherit permissions = yes inherit acls = yes follow symlinks = yes wide links = yes [TimeMachine] comment = Time Machine Backup path = /mnt/timemachine browseable = no hide unreadable = yes access based share enum = yes writable = yes read only = no # Time Machine requirements vfs objects = fruit streams_xattr fruit:time machine = yes fruit:time machine max size = 5000G fruit:model = MacSamba # Security (REQUIRED) guest ok = no valid users = '''username'''