[Feature request] Configuration of recycle bin functionality with Samba VFS module

SYSTEM INFORMATION
Debian 12
Webmin version 2.400

Hi, it would be nice if Webmin could enable and configure the “Recycle bin” VFS module on Samba shares, which is part of the samba-vfs-modules package in Debian / Ubuntu. This functionality is described here (sorry, not a clickable link to avoid hitting the Discourse spam filters with my new user account):

  • https://www.samba.org/samba/docs/old/Samba3-HOWTO/VFS.html#id2651247
  • https://poweradm.com/samba-recycle-bin-linux/

The first link to the Samba documentation for this functionality was outdated, here’s the latest:

This is the manual configuration that I added per share. For my public share that has guest access I added this to the Samba config file via the Webmin interface:

    ### Recycling ###
    vfs objects = recycle
      recycle:repository = .recycle
      recycle:keeptree = yes
      recycle:versions = yes
      recycle:touch = no
      recycle:exclude = ?~$*,~$*
      recycle:exclude_dir = .recycle
    ### /Recycling ###

For the homes share that only allows authenticated user access I used this config to create a homes/[username]/.recycle directory for each user (I can’t find the username wildcard in the official Samba documentation, elsewhere I’ve see both %u and %U, but at any rate my example works):

    ### Recycling ###
    vfs objects = recycle
      recycle:repository = %u/.recycle
      ## Also manually chmod 0770 .recycle/username
      ## https://linux.samba.narkive.com/RW4iF19R/samba-permission-problem-with-vfs-object-recycle-directory-mode
      recycle:directory_mode = 0770
      recycle:keeptree = yes
      recycle:versions = yes
      recycle:touch = no
      recycle:exclude = ?~$*,~$*
      recycle:exclude_dir = .recycle
    ### /Recycling ###

It looks like you can use either absolute path names or relative path names like I did that start without a /

So the config looks fairly straightforward to parse if it could be added to the per-share config options in Webmin’s Samba module.