[Samba] Recycling problem

Anders Östling anders.ostling at gmail.com
Fri Jan 22 10:53:26 UTC 2021


I can add the following facts regarding permissions and samba log entries

(bengt is the user account used to test this)

Looking in Windows, the user owns the directory .Trash and have full accesses to directory, subdirectories and files. So does Domain admins.

On the samba server, this is the shown permissions in bengt’s home directory (U:)

drwxrwx---+ 2 bengt domain users 4096 Jan 22 11:46 .Trash

The log.smbd shows this

[2021/01/22 11:45:11.447287, 5] ../../source3/smbd/vfs.c:1368(check_reduced_name)
 check_reduced_name: Bengt/Imerys/20191016 Data request template - SUPPLIERS - v6.xlsx reduced to /share2/Users/Bengt/Imerys/20191016 Data request template - SUPPLIERS - v6.xlsx
[2021/01/22 11:45:11.448509, 1] ../../source3/modules/vfs_recycle.c:311(recycle_create_dir)
 recycle: mkdir failed for /share2/Users/bengt with error: Permission denied

To my untrained eye, is looks like samba is trying to create the .Trash folder, and fails. Am I right?

Anders Östling

Dämmegatan 11
SE-25442 Helsingborg
Sweden
Phone: +46 768 716 165
Skype: anders.ostling at outlook.com

On 22 Jan 2021, 09:27 +0100, Anders Östling <anders.ostling at gmail.com>, wrote:
> All, I asked about the vfs module recycling a  couple of weeks ago, and we now have a working solution for shared folders, ie one recycle bin for our Documents share that seems to work as it should.
> The next issue is the personal recycle bins. I have tried a couple of variants, with mixed success. The latest one is modeled after a german blog’s example, but still not fully working.
>
> [Users]
>  comment = "User home directories"
>  path = /share2/Users
>  read only = no
>  recycle:repository = /share2/Users/%U/.Trash
>  recycle:keeptree = yes
>  recycle:versions = yes
>  recycle:touch = yes
>  recycle:exclude=*.tmp,*.TMP
>  guest ok = no
>
> [%U_Trash]
>  comment = "Personlig papperskorg"
>  path = /share2/Users/%U/.Trash
>  browseable = Yes
>  valid users = %U
>  read only = no
>
> So, trash shares are browsable and can be accessed by users on the test domain, but files deleted from home directories are not moved there. I must be missing some vital details since it works fine with shared folders..
>
> [Dokument]
>         comment = “Dokument”
>         path = /share2/Dokument
>         read only = no
>         guest ok = no
>         recycle:repository = /share2/Dokument/Papperskorgen
>         recycle:keeptree = yes
>         recycle:versions = yes
>         recycle:exclude = *.tmp,*.TMP


More information about the samba mailing list