In the good case that will show:
# check after mount
-rwxr-xr-x 1 ubuntu ubuntu 0 Jun 13 10:02 /mnt/test/testfile*
-rw-rw-rw- 1 root root 0 Jun 13 10:02 /storage/testfile
# not there before removal
ls: cannot access '/mnt/test/.recycle': No such file or directory
# recycle worked
-rwxr-xr-x 1 ubuntu ubuntu 0 Jun 13 10:02 /mnt/test/.recycle/testfile
Jammy: 2:4.15.5~dfsg-0ubuntu5 - working
Focal: 2:4.13.17~dfsg-0ubuntu0.21.04.2 - working
Bionic: 2:4.7.6+dfsg~ubuntu-0ubuntu2 - working
Xenial: 2:4.3.11+dfsg-0ubuntu0.16.04.34 - working as well
In Xenial I tried all three variants of
vfs objects = recycle full_audit
vfs objects = full_audit recycle
vfs objects = recycle
And all three worked.
Note for latter reproducers, trivial command series that will reproduce this after having smb.conf set up as (like above):
[storage]
full_audit: prefix = %u|%I
full_audit: success = unlink
full_audit: failure = non
comment = testshare
path = /storage
#vfs objects = recycle full_audit
vfs objects = full_audit recycle
#vfs objects = recycle
read only = no
guest ok = yes
$ sudo umount /mnt/test; sudo systemctl stop smbd; sudo rm -rf /storage /mnt/test; sudo mkdir /storage /mnt/test; sudo touch /storage/testfile; sudo chmod -R ogu+w /storage/; sudo systemctl start smbd; sleep 2s; sudo mount -t cifs //127.0.0.1/storage /mnt/test/ -o username= ubuntu, password= ubuntu, uid=1000, gid=1000; ll /storage/testfile /mnt/test/testfile; ls -laF /mnt/test/.recycle; rm /mnt/test/testfile; sleep 2s; ls -dl /mnt/test/ .recycle/ *
In the good case that will show: .recycle' : No such file or directory .recycle/ testfile
# check after mount
-rwxr-xr-x 1 ubuntu ubuntu 0 Jun 13 10:02 /mnt/test/testfile*
-rw-rw-rw- 1 root root 0 Jun 13 10:02 /storage/testfile
# not there before removal
ls: cannot access '/mnt/test/
# recycle worked
-rwxr-xr-x 1 ubuntu ubuntu 0 Jun 13 10:02 /mnt/test/
Jammy: 2:4.15. 5~dfsg- 0ubuntu5 - working 17~dfsg- 0ubuntu0. 21.04.2 - working dfsg~ubuntu- 0ubuntu2 - working dfsg-0ubuntu0. 16.04.34 - working as well
Focal: 2:4.13.
Bionic: 2:4.7.6+
Xenial: 2:4.3.11+
In Xenial I tried all three variants of
vfs objects = recycle full_audit
vfs objects = full_audit recycle
vfs objects = recycle
And all three worked.