This little guide explain how to add an hidden .recycle folder in top of each samba share.
sudo nano /usr/share/ebox/stubs/samba/smb.conf.mas
Add in each section of [home] , [<% $group->{'sharename'} %>] and [<% $share->{share} %>] after the browseable row this:
vfs object = recycle
recycle:keeptree = Yes
recycle:versions = Yes
recycle:touch = Yes
recycle:maxsize = 500000000
recycle:exclude = *.tmp|*.temp|*.o|*.obj|~$*|*.~??
Do some changes in the samba ebox module so it rewrite the smb.conf.
With the above settings the recycle bin will not save the files above 500MB. See the samba manual for other useful settings:
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/VFS.html#id2644353Add a script to /etc/cron.daily to delete the files after 30days of deletion:
sudo nano /etc/cron.daily/purge_samba_recycle
and write in it:
#!/bin/sh
#
find /home/samba/*/*/.recycle/* -atime 30 | xargs rm -rf
Make the script executable
sudo chmod +x /etc/cron.daily/purge_samba_recycle
Francesco
PS: remember to rewrite these mods if you update the samba ebox module