Btsync Permissions

Status
Not open for further replies.

Bobbiek04

Dabbler
Joined
Sep 27, 2016
Messages
40
I am sure I am missing something stupid. I have been running btsync to get files onto my freenas and everything has been running great thanks to Joshua in this thread. Now I was going to use it to send files to a remote computer for backup. For some reason the files are not being sent from the freenas to the target computer. I tried using another computer (windows 10) and had no issues so I know its not on the receiving end.

Suspecting a permissions issue I checked the ownership of the files within the jail and found that it sure enough is a permissions issue.

Code:
root@btsync_1:/ # ls -l /media/sync											 
total 299766																	
drwxrwxrwx  3 btsync  wheel		  6 Mar  9 19:52 .sync					   
-rw-rw-rw-  1 1001	1001	 2050749 Sep 24  2011 2011-9-21 CCWBooklet.pdf	
-rwxr-xr-x  1 btsync  1001	   43862 Jun  6  2010 CSI codes - Alphabetical.pdf
-rw-r--r--  1 btsync  1001	26166615 Jan 31  2014 D7100_EN.pdf				
-rw-rw-rw-  1 1001	1001   279400953 Jul 10  2016 GOPR0051.MP4


The files that have btsync as the owner send with no issue presumably because they were created within the jail. out of curiosity I changed the ownership of the files that were not working.

Code:
root@btsync_1:/ # chown -R btsync /media/sync								   
root@btsync_1:/ # ls -l /media/sync											 
total 299766																	
drwxrwxrwx  3 btsync  wheel		  6 Mar  9 19:52 .sync					   
-rw-rw-rw-  1 btsync  1001	 2050749 Sep 24  2011 2011-9-21 CCWBooklet.pdf	
-rwxr-xr-x  1 btsync  1001	   43862 Jun  6  2010 CSI codes - Alphabetical.pdf
-rw-r--r--  1 btsync  1001	26166615 Jan 31  2014 D7100_EN.pdf				
-rw-rw-rw-  1 btsync  1001   279400953 Jul 10  2016 GOPR0051.MP4 


This resulted in btsyc sending the files with no issue. My question is how to make this system work without having to go into the jail every time I want to send files. From this point forward, i will be using the freenas as my main storage via Unix sharing on my windows pc logged in as the admin. How do I make the two users get along?
 

Allan Wilmath

Explorer
Joined
Nov 26, 2015
Messages
99
So generally permissions go something like users > in to groups > in to resources.

I think you should find that there is a btsync user and btsync group. Add the user that is generating the file to be sent to the btsync under auxiliary/additional groups in that users settings in FreeNAS. Then set that users umask, this is the default permissions used when files are created, so that the group has read permissions. If the group permissions are set to read, and btsync user and the user making the files are part of the same group, then you should be good to go.

Good luck.
 

Bobbiek04

Dabbler
Joined
Sep 27, 2016
Messages
40
I'm sorry to dig up an old thread, but I am testing out 11.2 with iocage and I am running across this problem again. The only difference is that the sync user and the windows user are in the same group with still no luck. Once I force things with chown then everything works.

Any ideas?
 
Status
Not open for further replies.
Top