[Samba] Locking file access

Andrew Walker walker.aj325 at gmail.com
Wed Apr 28 17:57:47 UTC 2021

On Wed, Apr 28, 2021 at 1:42 PM Carlos <carlos.hollow at gmail.com> wrote:

> Hi
> I looked at https://wiki.samba.org/index.php/The_New_VFS,
> But I didn't understand how to "modify" to work with the "new vfs" ....
> Any help on how to stay in my conf (smb.conf)?
> Regards
Your best bet is to look at manpage of vfs_full_audit on server where samba
is installed before configuring the module to make sure you stay within
existing VFS functions.

You have this:
"full_audit: success = rmdir unlink open write chmod chown mkdir"

but you probably need this:
"full_audit: success = unlinkat open write chmod fchown mkdirat"

The order of your VFS objects is also potentially problematic:
"vfs objects = recycle, full_audit, acl_xattr"
When an file is unlinked, it will stop at recycle and not hit full_audit
(hence not logged) unless there's an error or a file is being purged from
the recycle bin.

I also noticed that your path mentions glusterfs. If this is on glusterfs,
then there are also additional design / configuration considerations
(setting appropriate vfs module - either vfs_glusterfs or
vfs_glusterfs_fuse), and possibly ctdb setup considerations depending on
environment / intended use.

More information about the samba mailing list