Minimal Read Only Samba
Minimal Samba config for giving read-only access to a directory. This is useful for sharing files with other computers without allowing them to modify or delete files.
; Minimal Samba config for readonly shares
; Filename: smb.conf
; Copy this in /etc/samba/smb.conf and run "systemctl restart smbd"
[global]
server role = standalone server
map to guest = Bad User
[data]
path = /data
read only = yes
guest ok = yes
guest only = yes
browseable = yes
force user = nobody
; force user = root ; caution! guest can ready all files
; hosts allow = 10.10.10.10 10.10.10.11 ; only allow access from these hosts