Samba is overly complex. The number of configuration options makes it very configurable and therefore cool but some of those options are just completely crazy.
One such example is the creation of publicly available folder - something that I have no doubt is very popular when you create a NAS server at home and you just want to have one network share to exchange files between computers. Doing that using Microsoft Windows is quite simple: you just specify that everyone shall have read/write permissions and that is it. With Samba on Linux the case is not quite so easy. Here's an example configuration that achieves just that:
[public] path = /storage-location-of-public-drive guest ok = yes read only = no public = yes browseable = yes writeable = yes create mask = 0666 force create mode = 0666 security mask = 0666 force security mode = 0666 directory mask = 0777 force directory mode = 0777 directory security mask = 0777 force directory security mode = 0777
I dare someone to logically explain why the hell one needs 4 entries to set the same thing (
security create and then finally
force security create) and then defend that as a sane thing to do.
Anyways... Creating public Samba share demystified