Resilio Sync - root and Samba files don't sync.

bar17

Dabbler
Joined
Oct 24, 2019
Messages
33
Hello,

I have been working on setting up a system that utilizes Resilio Sync and SAMBA to backup and access my files.

The Problem: Files added via SAMBA, via the rslsync jail user, or by the FreeNAS root user in a folder don't propagate via Resilio Sync. Only files added on my Windows clients with Resilio can add files and have them sync.

I did not realize this at first because usually the files are only added, edited, etc from Windows Clients.

Background:

FreeNAS server /w Resilio Jail created using the plugin.
Several datasets that are UNIX and mounted in the Resilio Jail.
Several datasets that are Windows and shared with SAMBA.
A single dataset "shares" that is Windows and is mounted in the Resilio Jail.
Windows 10 client that can access all SAMBA shares and has Resilio installed with permission in all folders.
All datasets are owned by user nobody group "name of dataset" and my user account for SAMBA and the user rslsync in both the Jail and in FreeNAS is part of all groups they need access to.

The problem came up attempting to move files from one SAMBA share to the samba share into the resilio folder /shares/vb using my Windows "e6520" computer. The files did not sync to my e6520 machine.

I created a test folder /shares/vb/test and created 4 files.

One on my Windows machine in the Sync folder. orig-from-e6520-via-resilio.txt
One on my Windows machine directly in the folder using the samba share. orig-from-e6520-via-samba-share.txt
One using the root account on FreenNAS directly; orig-from-trusty-root.txt
And one using the rslsync in the jail. orig-from-trusty-rslsync.txt

The only file that syncs back to the windows machine or any other computers that are part of the sync folder is the one that originates on the Windows machine and is placed in the sync folder. Placing the file directly in the folder via the Jail user rslsync, the root account, or the SAMBA share does not work.

As you can see all files have the same permission, same group, but different owners. rslsync is part of the "shares" group on both the FreeNAS machine and the FreeNAS jail, and the windows SAMBA user "bryan" is part of "shares" as well. How come they don't get noticed by FreeNAS and sync?

Code:
root@Trusty[/mnt/tank1/ds1/shares/vb/test]# ls -al
total 43
drwxrwx---+  2 rslsync  shares   6 Jan 26 11:14 .
drwxrwx---+ 22 nobody   shares  34 Jan 26 11:10 ..
-rwxrwx---+  1 rslsync  shares   0 Jan 26 11:10 orig-from-e6520-via-resilio.txt
-rwxrwx---+  1 bryan    shares   0 Jan 26 11:11 orig-from-e6520-via-samba-share.txt
-rwxrwx---+  1 root     shares   2 Jan 26 11:13 orig-from-trusty-root.txt
-rwxrwx---+  1 root     shares   2 Jan 26 11:14 orig-from-trusty-rslsync.txt


Any help is appreciated. Thank you.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288

bar17

Dabbler
Joined
Oct 24, 2019
Messages
33
Don't have a quick answer to your problem, but search the forum and perhaps this https://hendroff.wordpress.com/2019/02/14/resilio-sync-setup-for-freenas-angular-ui/ might be of help.

I have seen this blog post. Unfortunately following these instructions verbatim is not practical for my setup. It assumes a single user and windows share all with the exact same username and group. Further, I am not sure that following those instructions would even fix my problem, I will have to perform a test.

I have the rslsync user and my windows Samba user using different accounts both in the group "shares".

This is not a problem if I am using a Windows client with sync. The time it becomes a problem is copying or moving files from a Samba share or the freenas maching directly via CLI into a Resilio folder and expecting it to sync to other computers.

Basically, Resilio Sync is not noticing new files are placed in the folder if they are not placed via the Resilio protocol. If placed natively on FreeBSD, via the Jail, or via SMB they are not synced and distributed. An annoying work around is to disconnect the FreeNAS sync folder and reconnect it, forcing it to rescan, at which point it then distributes the files to all connected clients.

There is a option in the Advanced Resilio settings for "folder_rescan_interval" and the default is "600" seconds. I had files sit there well over 600 seconds with no awareness demonstrated by sync. Apparently this rescan is separate from the manual rescan I described above.
 
Last edited:

bar17

Dabbler
Joined
Oct 24, 2019
Messages
33
Did you have a look at part two of that blog post - the advanced setup? https://hendroff.wordpress.com/2019...etup-for-freenas-improved-windows-10-version/

Yes, I have seen this as well. It is a tutorial that allows you to restore backups from your Samaba drive. I don't have a problem with my windows client. My problem is that my Resilio Jail does not notice file changes in the folder unless they originated from another sync client.

It seems closer to problem discussed under "Notifications" on Resilio's website or on this Resilio Forum.

The only fix I see per the second link I posted is kind of hacky and given I am not an expert I try to stay with elegant and simple solutions.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
OK, I'm not a resilio user and thought those links might offer some hints about configuring perms etc which you could use.
 
Top