How to Samba Network Recycle-Bin?

Samba uses VFS (Virtual File System) Module for network recycle bin.
Various modules VFS modules that samba can use are located at “/usr/lib/samba/vfs”.
For Recycle purpose we are using module.
Use VFS object to the Shares for which Recycle-Bin is required as below:
path = /Apps/Scripts
public = yes
writable = yes
browsable = yes
valid users = user1 user2 user3
vfs object = recycle
recycle:repository = .RecycleBin/%U
recycle:keeptree = Yes
recycle:touch = Yes
recycle:versions = Yes
recycle:maxsize = 0
recycle:exclude = *.tmp
recycle:exclude_dir = /tmp
recycle:noversions = *.ppt
The recycle configuration is only valid for the Directory Path defined in a Share,
i.e. “path = /Apps/Scripts”. Add the configuration to all the share for which
Recycle-Bin is required.
Options are as below:
1. recycle:repository = .RecycleBin/%U
This option defines where deleted files will be stored.
.RecycleBin is the directory where deleted stuff will be moved within a shared path.
%U is user name of the person currently browsing the share.
So a sub-directory will be created under .RecycleBin by the name of the user who is
deleting the files.
Eg. If user1 is browsing the share and deleted any file. The file will moved to .RecycleBin/user1
2. recycle:keeptree = Yes
Specifies whether the directory structure should be kept or if the files in the directory that is being deleted should be ke
pt separately in the recycle bin.
3. recycle:touch = Yes
Specifies whether a file’s access date should be touched when the file is moved to the recycle bin.
4. recycle:versions = Yes
If this option is set, two files with the same name that are deleted will both be kept in the recycle bin. Newer deleted ver
sions of a file will be called “Copy #x of filename”.
5. recycle:maxsize = 0
Files that are larger than the number of bytes specified by this parameter will not be put into the recycle bin.
6. recycle:exclude = *.tmp
List of files that should not be put into the recycle bin when deleted, but deleted in the regular way.
7. recycle:exclude_dir = /tmp
Contains a list of directories. When files from these directories are deleted, they are not put into the recycle bin but are deleted in the regular way.
8. recycle:noversions = *.ppt
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.

Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

1 × four =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>