merging for 2.2.6pre1
[Samba.git] / examples / VFS / recycle / README
blob2b85a65925e8dc5541bb2cf8da77dad0b752f818
1 The recycle VFS module implements a recycle bin for Samba.
2 Deleted files will be moved to a special directory and
3 not be deleted unless specified in the configuration file.
4 It is up to the administrator/user to clean up the files
5 in the recycle bin.
7 Installation:
9 1. Build VFS module using the GNU autoconf script and Makefile 
10    in the parent directory (cd .. && ./configure && make)
11 2. Install module by copying to /usr/lib/samba/vfs (or any other place you like)
12 3. Install/modify recycle.conf. See below for the description
13 4. Modify smb.conf to use the recycle module
14    Add the lines "vfs object = /usr/lib/samba/recycle.so"
15    and "vfs options = /etc/samba/recycle.conf".
16 5. Start Samba
19 Options for recycle.conf:
20 name
21         name of the recycle bin at root level of the share
22         allows smb.conf substutitions like %U.
23         Example:
24           name = .recycle/%U
26 mode    
27         KEEP_DIRECTORIES : retain directory hierarchy of deleted file,
28         VERSIONS : create several versions of a file in recycle bin if
29                    the file already exists in the recycle bin
30                     e.g.        mytext.doc
31                                 Copy #1 of mytext.doc
32                                 Copy #2 of mytext.doc
34         TOUCH : touch access date when moving files to the recycle bin.
35                 This is useful for automatic cleanup scripts.
36                 Attn: This doesn't work if you have no write permissions
37                       to the file being deleted. Deletion works if you
38                       have write permissions to the parent directory.
39         Example:
40           mode = KEEP_DIRECTORIES|VERSIONS|TOUCH
42 maxsize
43         maximum size of files to be moved to recycle bin. Setting this zo
44         zero (default) moves files of any size to the recycle bin.
45         Example:
46           maxsize = 0
48 exclude
49         exclude files from moving to recycle bin. Delete them immediately
50         Useful for temporary files. You can use the wildcards * and ? 
51         Example:
52           exclude = *.tmp|*.temp|*.obj|~$*|*.$$$
54 excludedir
55         exclude directories from the recycle bin, useful for temporary
56         directories.
57         Example
58           excludedir = /tmp|/temp|/trash
60 noversions
61         don't create versions of files in the recycle bin. Only usefull if
62         mode = VERSIONS is set.
63         Examples:
64           noversions = *.doc|*.xls|*.ppt
66 Example smb.conf:
68 [homes]
69         comment = Home-directory
70         path = /home/%u
71         read only = No
72         create mask = 0750
73         vfs object = /usr/lib/samba/recycle.so
74         vfs options = /etc/samba/recycle.conf
76 Example recycle.conf:
78 name = .recycle/%U
79 mode = KEEP_DIRECTORIES|NOVERSIONS|TOUCH
80 maxsize = 0
81 exclude = *.tmp|*.temp|*.o|*.obj|~$*
82 excludedir = /tmp|/temp|/cache
83 noversions = *.doc|*.xls|*.ppt