Maybe it could be set using samba registry:
net conf setparm Homes recycle...
I’m going to test it later and report…not in front of pc right now.
EDIT:
@saitobenkei you’re right, it’s not possible by customizing the include.conf, another section seems not accepted.
I adapted the samba package and added an /etc/samba/include_homes.conf to be able to customize the homes section.
You can test it by updating an existing samba instance, in the following example it’s samba3. To be able to upgrade, the “force” option needs to be used. Please don’t use that for usual upgrades as it upgrades without checking the version.
api-cli run update-module --data '{"module_url":"ghcr.io/mrmarkuz/samba:addincludehomes","instances":["samba3"],"force":true}'
Now you can edit /etc/samba/include_homes.conf and add your settings for the recycle bin.
I use nano for editing, you can choose any editor:
runagent -m samba3
podman unshare nano $(podman volume inspect config --format={{.Mountpoint}})/include_homes.conf
I added following content, keeptree preserves directory structures and versions allows multiple versions of deleted files.
recycle:repository = .recycle
recycle:keeptree = yes
recycle:versions = yes
In the case of a home recycle bin the $U variable is not needed IMO as it’s not a “shared” recycle bin for more users like the usual shares.
After restarting the samba-dc service the homes recycle bin should work.
systemctl --user restart samba-dc