Recycle bin permission problem

I apologize in advance if this is a trivial problem; I’m not a very experienced FreeBSD/TrueNAS user. I have a permission problem with a recycle bin. My production system (P) and a second one (S) are both on TrueNAS Core 13.0-U6.1 with what should be the same configuration of pool and datasets. Each has a SMB share with “Export Recycle Bin” checked. On P, things work as they should with deleted files showing up in the bin.

On Windows 10 22H2 when running an app to sync P (source) to S (destination) (Karen’s Replicator) or trying this manually in File Explorer, I get errors saying it can’t delete a file. I looked in samba4/log.smbd on S and saw many “recycle_unlink_internal: xxx.xxx: failed to get recycle bin for file: Permission denied”.

A shell command “ls -al” for .recycle on P showed “drwxrwxrwx 3 root wheel 3 Apr 1 2020 .recycle”; On S it shows “drwxrwx———+ 3 root wheel 3 Apr 23 2021 .recycle”. I did a “chmod 777 .recycle” on S but it made no difference.

On S “getfacl .recycle”:

  • file: .recycle
  • owner: root
  • group: wheel
    owner@:rwxpDdaARWcCos:fdi—I:allow
    group@:rwxpDdaARWcCos:fdi—I:allow
    everyone@:--------------:fdi—I:allow
    owner@:rwxp–aARWcCos:-------:allow
    group@:rwxp–a-R-c–s:-------:allow
    everyone@:rwxp–a-R-c–s:-------:allow

I don’t understand why S should have an ACL on this file when P doesn’t. I didn’t want to experiment with trying to remove the ACL without understanding more about the cause. [I couldn’t find a similar problem in either the old or new forum.] Did I do something to make this happen? Is there an easy way to recover from this? Thanks for any insight.

Problem solved - I went back to the dataset permissions on S and reset recursively to the same settings as on P.