[Samba] Samba recycle bin excludedir doesn't work for me

Victor Rodriguez vrodriguez at soltecsis.com
Thu Aug 24 10:24:11 UTC 2023


I'm testing the "recycle: excludedir" option of Samba recycle bin but 
for some reason every deleted file is sent to the recycle bin, even 
those in excluded paths. Using samba/focal-updates,now 

This is the config for that share:

     path = /isp/SHARE1
     browseable = no
     force create mode = 0660
     force directory mode = 0660
     directory mask = 0770
     valid users = @"Domain Admins", @"GPO-Usuarios"
     read list =
     write list = @"Domain Admins", @"GPO-Usuarios"
     admin users = @"Domain Admins"
     vfs objects = acl_xattr full_audit recycle
     full_audit:prefix = %S|%u|%I
     full_audit:failure = openat mkdirat renameat unlinkat pwrite pread 
connect disconnect
     full_audit:success = openat mkdirat renameat unlinkat pwrite pread 
connect disconnect
     hide unreadable = yes
     hide unwriteable files = yes
     recycle: versions = Yes
     recycle: excludedir = /tmp|/var/tmp|_RFOLDERS
     recycle: directory_mode = 0700
     recycle: repository = _RecycleBin
     recycle: inherit_nt_acl = Yes
     recycle: keeptree = Yes

If I understood well, items deteled from \\SHARE1\_RFOLDERS (that is, 
/isp/SHARE1/_RFOLDERS) should not go to the recycle bin... but the do.

I've tried a few things but none worked so far:

- Set just one path as "excludedir =" argument, just in case the 
delimiter isn't a pipe. I've seen examples with commas, spaces and 
pipes, which one is correct?

- Set the full real path /isp/SHARE1/_RFOLDERS.

- Tried with and without forward slashes in the path (/_RFOLDERS, 

- Tried with and without wilcard(s) at the end of the path.

Should this work like I think it should? What could I be doing wrong?

Thanks in advance.

More information about the samba mailing list