Cannot modify files synched by Syncthing

Status
Not open for further replies.

mvcad

Contributor
Joined
Feb 25, 2018
Messages
116
Hi everyone,
I've managed to synchronize a folder from my windows PC to my FreeNAS box using Syncthing, however I cannot edit any file that was copied over from my PC on my NAS. I know my user and syncthing user have read, write and execute permission on my windows share in the NAS. I can create, delete and modify files that I create myself directly on the dataset in my FreeNAS that is also used by syncthing to sychronize my files. The syncronization is successfull, however if I try to open a file from the NAS that was originally on my PC and modify it, it wont let me save the changes, It says "You do not have permission to open this file. See the owner of the file or an administrator to obtain permission."

The funny thing is that it lets me change the name of the file and even delete it, but not modify it. Any ideas on why this would be happening?

The user owner of the share is Syncthing, as well as the group. ID of the user and group is 983. I added syncthing group as an auxiliary group for my user.

I'd appreciate any help.
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
Welcome to the forums!

In order to help you better, please post FreeNAS version and full hardware specs (this is highly recommended and greatly increases your chance of getting help, as per forum rules).

Can you go into the shell and do a "ls -la" on the files you are referencing.
 

mvcad

Contributor
Joined
Feb 25, 2018
Messages
116
Thanks for the reply, I have installed FreeNAS 11, hardware specs are, Intel core i3 7100 @ 3.9 GHz; 2 off Crucial CT8G4DFD824A 8GB (1x8GB) 2400MHz DDR4; boot drives are 2 mirrored SanDisk Ultra Fit 16GB USB 3.0; 3 Off Seagate skywolf HDD 4.0 TB each in RaidZ configuration; 1 off Samsung pro SSD 256 GB for running my jails; ASRock H270M-ITX/ac Motherboard; Cooler Master MasterWatt Series 550W Power Supply; Fractal Design NODE 304 Black Mini ITX Case.

I'll try to get file list later when I get home.
 
Last edited:

mvcad

Contributor
Joined
Feb 25, 2018
Messages
116
I've run ls -la command on the root of syncthing dataset, and also under one of the subfolders. see below:

Code:
drwxrwxr-x  39 syncthing  syncthing  82 Feb 25 20:39 _DocsMario				 
drwxrwxrwx  25 Mario	  syncthing  40 Feb 26 02:24 _PicturesMario			 
drwxrwxr-x   5 syncthing  syncthing   5 Feb 25 21:50 .						 
drwxr-xrwx   7 root	   wheel	   7 Feb 24 22:18 ..						 
drwxrwxr-x   3 syncthing  syncthing   4 Feb 25 12:40 Test


Code:
-rwxrwxr-x   1 syncthing  syncthing   25000000 Jun  5  2012 skillmax.part5.rar 
-rwxrwxr-x   1 syncthing  syncthing	8317983 Jun  5  2012 skillmax.part6.rar 
drwxrwxr-x  18 syncthing  syncthing		 21 Feb 25 05:17 Sky Drive		   
drwxrwxr-x   4 syncthing  syncthing		 30 Feb 25 05:49 SpaceGass Training Videos																		   
-rwxrwxr-x   1 syncthing  syncthing   33222030 Jun 13  2011 T-MST4DEUC.exe	 
-rwxrwxr-x   1 syncthing  syncthing	  52990 Feb  7  2013 t1.pdf			 
-rwxrwxr-x   1 syncthing  syncthing		 12 Dec  4  2011 Telefono Maria Helena Nuevo.txt																	 
-rwxrwxr-x   1 syncthing  syncthing  172881012 Apr 25  2010 testdisk1.log	   
-rwxrwxr-x   1 syncthing  syncthing	  21504 Aug  8  2015 Thumbs.db		   
-rwxrwxr-x   1 syncthing  syncthing	 119472 Aug  7  2016 To try fix Asus PCeAC68 NIC.docx																   
drwxrwxr-x   8 syncthing  syncthing		 11 Feb 25 05:17 UNSW Master		 
-rwxrwxr-x   1 syncthing  syncthing	  26932 Apr  6  2015 UpperFilters.reg   
-rwxrwxr-x   1 syncthing  syncthing   15056725 Jun 21  2010 URANTIA-EN.pdf	 
-rwxrwxr-x   1 syncthing  syncthing   15762659 Mar  3  2010 URANTIA-SP.pdf	 
-rwxrwxr-x   1 syncthing  syncthing		 69 Jul 14  2009 VANE.TXT		   
 
Last edited by a moderator:
Joined
Apr 9, 2015
Messages
1,258
Syncthing is the owner of the files, that means if your user is not in the same group it can not modify the files. It's a permissions problem so you will need to chown the files you want to modify or better yet create a group that has the same GID as the syncthing group and add your user to it in FreeNAS and make sure all the files are group modifiable.

This may help as well

https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-permissions
 

mvcad

Contributor
Joined
Feb 25, 2018
Messages
116
Thanks mate!, the link is great! I was actually looking for that but I didn't know where to start.
I did what you suggested but I still have the problem. I created a group called AccessSincthing with the same GID as Syncthing. I added the group to my user's auxiliary groups but still have the same issue. please have a look at these screenshots for my configurations so far:
 
Last edited:

mvcad

Contributor
Joined
Feb 25, 2018
Messages
116
Syncthing user:
upload_2018-2-26_19-57-25.png


ST Group
upload_2018-2-26_19-57-44.png


AccessSyncthin GID
upload_2018-2-26_19-58-12.png


Dataset
upload_2018-2-26_19-58-32.png


My User Auxiliary groups:
upload_2018-2-26_19-58-59.png
 

Attachments

  • upload_2018-2-26_19-56-46.png
    upload_2018-2-26_19-56-46.png
    5.9 KB · Views: 461
Joined
Apr 9, 2015
Messages
1,258
Try changing the owner user and group to your user.
 

mvcad

Contributor
Joined
Feb 25, 2018
Messages
116
Try changing the owner user and group to your user.
I did try that but no luck. However I managed to get it working by changing the permission type from Unix to Windows., and now I can modify any file. Just wondering if this has any security implication?
 

Fongaboo

Dabbler
Joined
Nov 12, 2013
Messages
30
Can you clarify what OS is running on the PC that originated the file? Can you clarify on what device/OS you are getting the unable-to-open error on?
 

mvcad

Contributor
Joined
Feb 25, 2018
Messages
116
Can you clarify what OS is running on the PC that originated the file? Can you clarify on what device/OS you are getting the unable-to-open error on?
Sure, All files are originated from my windows 10 PC. and also the error appears on the same windows PC when I try to open the file from a mapped drive on the FreeNAS box. however, the error disappears when I changed the permission type to Windows.
 
Last edited:

mvcad

Contributor
Joined
Feb 25, 2018
Messages
116
OK so this cleared up the problem completely?
yes indeed. and also I installed Syncthing on my wife's PC (Windows 10) with no issued whatsoever.
 
Status
Not open for further replies.
Top