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.recycleis 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 ifrecycle:subdir_modeis not set, MODE also applies to subdirectories. if this option is not set, the default mode0700is 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 fromrecycle: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 isTrue, 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 whenrecycle:versionsis 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
- ubuntu stonking: samba 2:4.24.7+dfsg-1ubuntu1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms