We have a Samba AD-DC with Rocky Linux 9.x and and other machine with samba file server AD. At samba file server needs to apply recycle bin. To apply this, is necessary samba-vsf-module package for recycle bin works right.
So, my file server its works but there is no this package on repository system. I try to search some channel/blog/ about this package. There are samba repository package system to install samba and yes, was installed and working.
Somebody can help me to fix this?
Or only compiling samba to works recycle bin in correct mode is possible?
Most likely will need to be compiled, since the system-installed one doesn’t have the module you require. Unless someone has packaged it, you can use https://pkgs.org to search.
I don’t see even this module available in Debian or Ubuntu when searching for vsf in package names. But perhaps they have it compiled in by default, never used it so cannot say for 100%.
Yes, I need (samba requires) this package to enable recycle bin in samba.conf. I did a lab with debian 12 and up it on AD-DC as file server and recycle bin works well. But, I would like to use Rocky Linux
First, It is not recommended to use a Samba AD DC as fileserver, for various reasons, one of the main ones being that you will need to set the permissions from a Windows machine.
Do you have ‘/usr/lib64/samba/vfs/recycle.so’ ? If you do, that is vfs_recycle.
Ah no wonder I couldn’t find it. You wrote vsf when it’s actually vfs.
root@rocky9:~# dnf provides */recycle.so
Last metadata expiration check: 2:13:14 ago on Sun 25 May 2025 08:04:41 AM CEST.
samba-4.20.2-2.el9_5.1.x86_64 : Server and Client software to interoperate with Windows machines
Repo : baseos
Matched from:
Filename : /usr/lib64/samba/vfs/recycle.so
confirms the above answer from @hortimech in that the main samba package has what you are looking for.
You just need to add (at a minimum) ‘vfs objects = recycle’ to ‘global’ in your smb.conf if you want all shares to have Samba recycle bins, or to a share if you just want it on one share. Note that if you already have a ‘vfs objects’ line, you need to add ‘recycle’ to that, or it will replace the existing one.
See ‘man vfs_recycle’ for more details.
Yes, I follow various blogs to know how enable vfs on smb.conf. As you answer, I add vfs objects = recycle on [global] section and after [share] section
All tests does not work
The recycle share give it 777 permission (chmod -R 777 /share/.recycle) following more smb.conf configuration modes.
All these configs I tested in Debian and works well. I can not understand why does not works with rocky linux. The smb.conf are equal in rocky linux and debian side.
I did the question because I think has other kind to enable recycle bin in redhat family package.
[root@srvadarq ~]# dnf provides */recycle.so
Last metadata expiration check: 1:42:49 ago on Mon May 26 06:56:49 2025.
samba-4.20.2-2.el9_5.1.x86_64 : Server and Client software to interoperate with
: Windows machines
Repo : @System
Matched from:
Filename : /usr/lib64/samba/vfs/recycle.so
samba-4.20.2-2.el9_5.1.x86_64 : Server and Client software to interoperate with
: Windows machines
Repo : baseos
Matched from:
Filename : /usr/lib64/samba/vfs/recycle.so
Ohhh, right. After many many tests I copied line from internet and no switch off this part
After save the smb.conf file and doing the command testparm it does not return wrong line with this line: recycle:subdir_mode = MODE but, was my fault yeah
A couple of other thoughts, is selinux getting in the way ? Easy to test, temporarily turn of selinux and see if it works. The other thought is permissions, do your users have write permission on /mnt/diskrede/.recycle/%U ? And can they ‘walk’ that path ?
Yes, I turn of selinux and yes, on the path mnt/diskrede/.recycle/%U the permission is 777. Yes =, I can walk in that path.
I did the same mode on Debian 12. And there the recycle bin works well.
I will switch only file server to Debian, because we need enable allright this service.