How to prevent users from saving/accessing certain files on a samba share in Linux ?
In Linux Samba server configuration, we have an interesting feature to turn off access on few files that matches a pattern.
It helps to make some files disappear and those files are not allowed to be accessed by the users.
Lets see how to mention this option in samba configuration.
I. “veto” option usage in Linux
[NewGenLinuxOutboundNonNGEL] comment = NewGenLinux Outbound Interfaces for Non-NGEL users path = /ngesupp/products/interfaces/outbound valid users = jack john saket michael usertest nguser mike writable = no browseable = yes guest ok = no force user = harsupp force group = dba veto files = /CHIMEPA/NGELbacs/NGELPAC/NGELSSEINTRAUSERDB/mymoneyint/sapfg/traveldoo/NGELequiniti/NGELPAYSLIP/NGELSSEPWORDRESET/NGELMAGLABELS/NGELPENPAYSLIP/NGELSSESIPSAYEPAY/capita/NGELOPSGREL/NGELSIPSAYE/NGELtm1NGELpayroll/carplus/NGELOTLBNS/NGELSIPSAYELEAVERS/IE_PAPERPAYSLIP/NGELP60SUBSTITUTE/NGELSIPSAYESD/IRE_PAY/trainingrec/
In above syntax, each file pattern is mentioned by using “/” instead of “,”.
So do not get confused by seeing this type of syntax.
Now here it will match all the files matched with this text and make is disappear.
No only disappear, it will not allow users to save files by this syntax.