[samba] recycle not working as I expected

Jim Shanks jim at shanks.cc
Fri Sep 30 14:28:50 GMT 2005

> I have the following in my configuration file and recycle is working for
> the share but
>   - versions is working as I expected
>  - touch does not seem to be changing the time on the files to show me
> when they were deleted
>  - keeptree does not work when there are multiple users within a share and
> prevents the recycle from working in some cases.
> ---- if user1 deletes a file everything works fine.  If user2 deletes
> something along the same tree the permissions prevent the creation of the
> file in the recycle.  So I've turned off keeptree
> - exclude does not seem to be working. I have tried the syntax below along
> with
>      recycle:exclude = /*.tmp/*.temp/   similar to what is used in veto
> files.
> samba 3.0.10
> Any help appreciated.
>  vfs object = recycle
>                 recycle:versions = yes
>                 recycle:touch = yes
>                 recycle:keeptree = no
>                 recycle:exclude = *.tmp|*.temp

This has been working for me for quite some time now:

        comment = Lake Region 911 Group Folder
        path = /data/e911home
        read only = No
        create mask = 0776
        directory mask = 0775
        vfs objects = recycle
        recycle:repository = Recycle Bin/%U
        recycle:keeptree = Yes
        recycle:touch = Yes
        recycle:versions = Yes
        recycle:maxsize = 0
        recycle:exclude = *.tmp *.TMP *.bak *.BAK
        recycle:exclude_dir = /tmp '/Recycle Bin' /temp /TMP /TEMP
        recycle:noversions = *.doc *.DOC *.xls *.XLS *.sxw *.sxc *.bkf

You will have to manually create the "Recycle Bin" folder (directory) at
the root of each share, but not the individual user folder.  Samba creates
a separate (username) folder for each user.  If I had it to do over again,
I wouldn't put the space in the "Recycle Bin" folder name . . . it has
caused me to have to do alot of complicated scripting to purge the files
automatically.  But . . . live and learn. :)


More information about the samba mailing list