Search code examples
sambafile-sharing

How does one make Samba change the owner of a file when it is edited?


I want to add some basic accountability to a Samba share without going all out with the audit logging module. If a file is owned by user1:usergroup and user2 edits it, is it possible for the ownership status to change automatically to user2:usergroup?


Solution

  • Samba can't automatically change the ownership of the file for you if it's edited. It would be possible to write a Samba VFS plugin that can do this for you, but at that point you're probably better off setting up the audit module.