set appropriate permissions on .recycle directory
We have a TrueNAS customer that has enabled the recycle bin functionality in Samba. They are getting hammered with error messages like similar.
[2019/01/21 12:05:46.738270, 1] ../source3/modules/vfs_recycle.c:311(recycle_create_dir) recycle: mkdir failed for .recycle/jwheat with error: Permission denied
After discussion with Andrew Walker, an idea arose to fix this by doing the following.
1. if recycle bin is enabled
2. on connect, samba will "become root" and create the user directory underneath the .recycle directory
3. after creation, samba will chown that user directory to the ad user on connect
This will get around the permissions errors related to the .recycle directory that this customer is experiencing.