Therefore, I've finally decided to copy/paste some existing (and working) examples I'm using every now and then.
1) Read-only share:
Code: Select all
[browse]
comment = Public Storage
path = /mnt/storage
browseable = yes
read only = yes
guest ok = yes
follow symlinks = yes
wide links = yes
Yet, it's marked as "read only".
These 2 options are necessary to provide access to symlink targets outside of the shared folder:
Code: Select all
follow symlinks = yes
wide links = yes
2) Hidden to public, but writable for "members":
Code: Select all
[members]
comment = Data Storage: Member access
path = /mnt/storage
browseable = no
read only = no
guest ok = no
write list = @member
force user = member
force group = member
This option declares who is allowed to write to this share:
Code: Select all
write list = @member
Code: Select all
force user = member
force group = member
On Debian-based distributions that's something like:
Code: Select all
$ services smbd restart