File Permissions on Trash Can Versioning Files

I keep running into permissions issues with files that were deleted on a remote device when that folder is set up for Trash Can File Versioning.

Basically, the files are correctly moved to .stfolder on my NAS, but the subfolders and files end up with “rwxr-xr-x” permissions, meaning that I cannot delete or move the files over SMB since my SMB user is not the same as the user that Syncthing runs as.

I have “Ignore Permissions” enabled, and that means that all non-deleted files end up with correct permissions when moved for example, but that setting does not seem to apply to “versioned” files, and I cannot find any way to change that setting.

What does the NAS run? (e.g. OS, etc.)

If it’s a Synology NAS by any chance, you should definitely enable ignoring permissions as otherwise it will mess up their custom ACL implementation.

Otherwise, try to read up on the topic of “umask” which controls the assigned permissions for newly created files on Unix-like systems.

This is on Unraid

On a regular Linux server, Samba can be configured with its “force user” parameter so that access to a particular network share is done on behalf of the specified user even though the logged on SMB user might be different. However, Unraid is a modified Slackware Linux distribution with much more limited controls provided by its web GUI so I don’t know how difficult it would be to do this.

Alternatively, you could try to put your Syncthing user into the same user group as your SMB user and grant group write access, or configure the umask settings as already suggested to open up the permissions on .stfolder.