VFS_RECYCLE(8)

πŸ’– VFS_RECYCLE β€” the Samba VFS recycle bin, bestie edition πŸ’–

okay so you're here because you want deletions on your Samba share to NOT be deletions, right? valid. iconic. that's vfs_recycle, a manual page from the samba(7) suite, and I'm about to walk you through the whole thing like we're texting at 2am. no cap. πŸ—‘οΈβœ¨


✨ NAME ✨

vfs_recycle β€” the Samba VFS recycle bin. it's giving Windows Recycle Bin but make it Unix. πŸ’…


✨ SYNOPSIS ✨

vfs objects = recycle

that's it. that's the whole vibe. πŸŽ€


✨ DESCRIPTION ✨

so this VFS module is part of the samba(7) suite, and what it does is intercept file deletion requests and move the affected files to a temporary repository instead of, like, actually deleting them immediately. same energy as the Recycle Bin on Windows computers. lowkey genius. 🧚

here's the tea though: the Recycle Bin will not appear in Windows Explorer views of the network file system (share), and it won't show up on any mapped drive either. not a bug, just how it be. instead, a directory called .recycle gets automatically created when the first file is deleted β€” but ONLY if recycle:repository isn't configured. if recycle:repository is configured, then the name of the created directory depends on recycle:repository. okurrr.

users can recover files from the recycle bin. 🫢 and here's the cute part: if the recycle:keeptree option has been specified, deleted files will be found in a path identical with that from which the file was deleted. so the directory tree stays put. so organized of us.

This module is stackable. periodt.


✨ OPTIONS ✨

okay bestie, here's the full lineup. every single one. no skipping. πŸ‘‘

  • recycle:repository = PATH β€” the path of the directory where deleted files should be moved. if this option is not set, the default path .recycle is used. 🌸
  • recycle:directory_mode = MODE β€” set MODE to the octal mode the recycle repository should be created with. the recycle repository gets created when the first file is deleted. and if recycle:subdir_mode is not set, MODE also applies to subdirectories. if this option is not set, the default mode 0700 is used. πŸ”
  • recycle:subdir_mode = MODE β€” set MODE to the octal mode with which sub directories of the recycle repository should be created. if this option is not set, subdirectories will be created with the mode from recycle:directory_mode. so it inherits, cute. πŸŽ€
  • recycle:keeptree = BOOL β€” specifies whether the directory structure should be preserved, or whether the files in a directory that is being deleted should be kept separately in the repository. pick your fighter. 🌳
  • recycle:versions = BOOL β€” if this option is True, two files with the same name that are deleted will both be kept in the repository. newer deleted versions of a file will be called "Copy #x of filename". no overwriting in this house. πŸ’…
  • recycle:touch = BOOL β€” specifies whether a file's access date should be updated when the file is moved to the repository. ✨
  • recycle:touch_mtime = BOOL β€” specifies whether a file's last modified date should be updated when the file is moved to the repository. ⏰
  • recycle:minsize = BYTES β€” files that are smaller than the number of bytes specified by this parameter will not be put into the repository. sorry little guys. πŸ™ˆ
  • recycle:maxsize = BYTES β€” files that are larger than the number of bytes specified by this parameter will not be put into the repository. big boys stay out. πŸ“
  • recycle:exclude = LIST β€” list of files that should not be put into the repository when deleted, but deleted in the normal way. wildcards such as * and ? are supported. πŸ¦‹
  • recycle:exclude_dir = LIST β€” list of directories whose files should not be put into the repository when deleted, but deleted in the normal way. wildcards such as * and ? are supported. 🌈
  • recycle:noversions = LIST β€” specifies a list of paths (wildcards such as * and ? are supported) for which no versioning should be used. only useful when recycle:versions is enabled. iykyk. πŸ’œ

✨ EXAMPLES ✨

move files "deleted" on share to /data/share/.recycle instead of deleting them. look at this config, it ate:

[share]
path = /data/share
vfs objects = recycle
recycle:repository = .recycle
recycle:keeptree = yes
recycle:versions = yes

✨ VERSION ✨

this man page is part of version 4.24.7-Ubuntu-4.24.7+dfsg-1ubuntu1 of the Samba suite. ⭐


✨ AUTHOR ✨

the original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. king behavior, honestly. πŸ‘‘


πŸ’– and that's the whole page bestie β€” go forth and recycle responsibly. your deleted files are safe, your directory tree is intact, and you understood every single line. main character energy fr fr. πŸŽ€βœ¨

β€” Samba 4.24.7-Ubuntu-4.24.7+dfsg-1ubuntu1, dated 09/13/2026. mwah. πŸ’…πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from