[Samba] Recycle Module
Cybionet
cybionet at videotron.ca
Thu Jun 21 00:44:42 GMT 2007
Greeting Cary,
Recycle bin on network work great. First create a .recycle directory
(directly in the share directory for your test).
cd <directory_name>
mkdir .recycle
chown root:root .recycle
setfacl -m group:DomainUsers:rwx .recycle
As you can see I use ACL(EA) on my filesystem. If you create this
repository directely in the share add the following parameter at your share.
/veto files = /.recycle//
Here the parameters to add at the end of the share parameters.
[share]
...
Enter your share parameters here.
...
vfs objects = recycle
recycle:repository =.recycle/%u
recycle:keeptree = yes
recycle:exclude = *.tmp *.temp
recycle:exclude_dir = /tmp /temp /cache
recycle:versions = yes
recycle:noversion = *.doc *.xls *.ppt
I like to add tmpwatch script to empty recycle after a period of time
when the file was deleted. You can find this script at
http://download.fedora.redhat.com/pub/fedora/linux/development/i386/os/Fedora/.
I use this on Gentoo.
Create a bash file and add the following command (168 represent a week
in hours).
/usr/sbin/tmpwatch -u 168 /<directory_name>/.recycle
Just add this script in the crontab and enjoy :-)
Robert
--
Cybionet - Solution reseautique
http://www.cybionet.com
More information about the samba
mailing list