Syncthing Issues

Status
Not open for further replies.

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
I have been trying to setup syncthing for about a week now and have had no success. As far as I can tell, I have tried everything, so I clearly am fundamentally missing something here.

I have followed instructions from many sources and have had varrying degrees of success, but none have ever actually worked. So far the best I have been able to get was being able to sync in one direction, that being from me via windows smb creating a file in the FreeNAS dataset, and that new file being transferred to my Windows Syncthing instance, but nothing would go the other way which tells me I have a credential issue within the jail or within FreeNAS and the jail can't write files to the mounted directory.

I have tried numerous things, and at this point I am just frustrated and unsure how to continue.'

I was previously following and posting in https://forums.freenas.org/index.ph...-plugins-write-permissions-to-your-data.27273 but the responses are coming a bit slow and a bit lacking. So I will copy paste some of what I think is important in here, and hopefully we will get somewhere a little quicker.

I have created within freenas, a user named syncthing, and assigned it UID 983, and made its primary group my SMB_Share group, as well as its Auxiliary group ( I am thinking it did that on its own, but im not sure, I don't think having it in primary and aux is an issue since my SMB User is set up that way and works), I also added Wheel to its Aux group. I have also created the user and group in syncthinks jail, and as far as I know I did that correctly. I used this from the original instructions; I am trying to follow "solution 3".

    • pw groupadd -n GROUP -g GID
    • pw groupmod GROUP -m USER
I am not sure if this is important, but the folder is set to windows permission type, changing it to unix doesn't seem to have an effect.

For good measure, I even tried setting the dataset owner to syncthing, doesn't seem to help. Would I have to restart the jail each time I try things such as thing? I have done all the ownership changes to the dataset with the jail running.

That didn't work, so I deleted the old jail and started from scratch once again.

I changed the user of syncthing to match the freenas user that owns the directory, although I did run into one issue.

Code:
service PLUGIN onestop
chown -R USER:GROUP /var/db/PLUGIN
sysrc 'PLUGIN_user=USER'
service PLUGIN start



This all worked, but the service wouldn't start again:

Code:
daemon: pidfile ``/var/run/syncthing.pid'': Permission denied
/usr/local/etc/rc.d/syncthing: WARNING: failed to start syncthing



So, right or wrong, I
Code:
chown -R USER:GROUP /var/run

which allowed it to start. I have the user and the groups matched from the jail to freenas itself, and this is what syncthing is giving me as an error on the files that it has found to be out of sync: "dir chmod: chmod DIRECTORY operation not permitted". I can't get this to work to save my life.

I also did
Code:
 chown -R USER:GROUP /mnt

in order to make sure the user I created has write in the jails mnt directory. I am clearly pretty new to all of this, but I think what I am doing *should* be working...

At this point I have no jail and am ready to start from scratch, again. I tried some more stuff but clearly flubbed something up, so I delete the jail. At this point, I think I have tried this 8-10 times, so I am totally lost as to what I have done correctly and what I done incorrectly as nothing seems to work 100%.
 

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
Were you able to figure this out?

In a roundabout way, yes. Looks like freenas doesn’t allow chmod in a windows permissions dataset. That was tripping up syncthing.

I am now running syncthing in a windows 10 VM, unfortunately with the data being synced over SMB which is incredibly sub optimal. I wish bhyve has a 10GB virtual network vs 1GB, that would at least help a little. It’s pretty brutally slow, but thankfully the VM doesn’t have to scan much as the data in the freenas dataset is never changed my a user. The only changes are being implemented from syncthing itself.


Sent from my iPhone using Tapatalk
 
Joined
Apr 9, 2015
Messages
1,258
That is basically one of the reasons why I use non-windows permissions on my SMB shares. It's not exactly optimal as far as windows is concerned but when you have to have Jails able to access the data in both read and write it was the only way I could make it work. Since my network is mostly my wife and I it's not really an issue.

You could create a dataset within the Windows share however that is set to Unix permissions while leaving other parts of the share set to Windows permissions. So that the jails can access the data there but still have windows permissions for the majority of data.
 

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
That is basically one of the reasons why I use non-windows permissions on my SMB shares. It's not exactly optimal as far as windows is concerned but when you have to have Jails able to access the data in both read and write it was the only way I could make it work. Since my network is mostly my wife and I it's not really an issue.

You could create a dataset within the Windows share however that is set to Unix permissions while leaving other parts of the share set to Windows permissions. So that the jails can access the data there but still have windows permissions for the majority of data.

So. I actually have an interesting situation right now... So I have a few options and I guess the info I get here will dictate the answers.

Situation; I set up my vdev wrong, I am in RAID Z1 instead of Z2 like I planned... Noob mistake. So, I have an opportunity to redo everything, more like, I AM GOING TO HAVE TO redo everything lol.

Point is, I guess I am a bit confused with my options for this. I do like syncthing, its doing exactly what I want it to. But I am unsure about the necessity of having Unix vs Windows Permissions. As far as windows users go, its really just me. I have a friend who will SSH in every now and then to upload some pictures for me to edit, and those files are being watched by syncthing. Beyond that, I am a 100% windows network, and its only me.

What are the pitfalls of using Windows with Unix permissions? From my understanding you can run into an issue where the locker files can get messed up? Not the technical definition, but I don't know enough to explain it better. If the pitfalls are small and rare, it may be worth it... I gave my buddy sshd rights, and realized I couldn't lock him out from reading (it doesn't matter, but I would like to at least pretend to be a legit sysadmin of my own box) my data since all my datasets are windows permissions which means I couldn't chmod them so other has 0 rights...

Or, I guess if those pitfalls are larger then I want to accept, I could go the route you suggested which is create a secondary dataset and set it to unix. All I am syncing is lightroom files and pictures which lightroom is using for its catalog. Use case: I have a photo editing PC at my parents house and one at my apartment, and I am trying to keep all pictures and lightroom data synced, and that is being done through my always on freenas box. Can't do it point to point because when I am in my apt, my parents photo editing PC is off, and vice versa.

Please hit me with your opinions/thought on this. I plan to be redoing my box within the next week or two.
 
Joined
Apr 9, 2015
Messages
1,258
I found a thread that probably gives most of the answers that you are looking for. https://forums.freenas.org/index.php?threads/cifs-share-and-unix-permissions.45032/

But the locking mechanism is one of the big things I can think of however I have never really come across a problem. One issue I did have was dealing with windows 10 and while it may not be related to how my SMB permissions are setup it could be that or a combination there of. Anyway I tend to take certain game files and just make a duplicate onto my FreeNAS when I switch to a different computer or drive. It's a lot easier to just backup my steam folder or folder for my Blizzard games and then install the latest client and allow it to update and repair any issues. Anyway I had a windows 10 based machine and when I would transfer from the SMB share on FreeNAS the permissions were wrong on the windows 10 computer and the games could not run or update. It was just setup for my stepdaughter to use while she was visiting but was a major pain.

Anyway a possible work around to having Unix permissions on a SMB share is to install a NFS client in windows and just use it that way. This is honestly what I am thinking about doing at some point myself since I tend to just mount the share to a drive anyway. However this only works with 7 enterprise and ultimate and probably pro or enterprise in windows 10. http://smallbusiness.chron.com/connect-windows-client-nfs-server-50773.html if using windows 7.

The only reason why I have not switched to a full linux based system is a lot of the games I use just don't function correctly under linux. And believe me I have tried to make it work, PlayOnLinux has never functioned correctly and WINE isn't doing much good either. I have read a ton of success stories using Mint linux and having the same stuff work but I can never get it to happen. I was able to make an ubuntu based system many years ago play WoW ok but the way Blizz has integrated their launcher/update that has no longer been possible. I am however pretty sure that will change quite a bit if Microsoft does what I expect in a couple years, which is require a credit card number to include updates and you will be charged accordingly.
 

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
I found a thread that probably gives most of the answers that you are looking for. https://forums.freenas.org/index.php?threads/cifs-share-and-unix-permissions.45032/

But the locking mechanism is one of the big things I can think of however I have never really come across a problem. One issue I did have was dealing with windows 10 and while it may not be related to how my SMB permissions are setup it could be that or a combination there of. Anyway I tend to take certain game files and just make a duplicate onto my FreeNAS when I switch to a different computer or drive. It's a lot easier to just backup my steam folder or folder for my Blizzard games and then install the latest client and allow it to update and repair any issues. Anyway I had a windows 10 based machine and when I would transfer from the SMB share on FreeNAS the permissions were wrong on the windows 10 computer and the games could not run or update. It was just setup for my stepdaughter to use while she was visiting but was a major pain.

Anyway a possible work around to having Unix permissions on a SMB share is to install a NFS client in windows and just use it that way. This is honestly what I am thinking about doing at some point myself since I tend to just mount the share to a drive anyway. However this only works with 7 enterprise and ultimate and probably pro or enterprise in windows 10. http://smallbusiness.chron.com/connect-windows-client-nfs-server-50773.html if using windows 7.

The only reason why I have not switched to a full linux based system is a lot of the games I use just don't function correctly under linux. And believe me I have tried to make it work, PlayOnLinux has never functioned correctly and WINE isn't doing much good either. I have read a ton of success stories using Mint linux and having the same stuff work but I can never get it to happen. I was able to make an ubuntu based system many years ago play WoW ok but the way Blizz has integrated their launcher/update that has no longer been possible. I am however pretty sure that will change quite a bit if Microsoft does what I expect in a couple years, which is require a credit card number to include updates and you will be charged accordingly.
Yea my only thing holding me to windows is games as well. I don't have a beastly battle station just to say I have one lol.

But the NFS workaround seems plausible, I thought I remembered reading somewhere Windows ships with that now. Either way, I do have Win 10 Pro, so I would assume I have it. I may have to look into that.
 
Joined
Apr 9, 2015
Messages
1,258
I am setup to dual boot Mint and windoze. My system isn't beastly either, Fx8350 with an RX480 and 16GB of ram. I have more graphics power in my mining rig with 3 gtx 1080's soon to be more. I have a couple games that are truly cross platform though and hopefully the developers will all start releasing clients that work on linux.
 

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
I am setup to dual boot Mint and windoze. My system isn't beastly either, Fx8350 with an RX480 and 16GB of ram. I have more graphics power in my mining rig with 3 gtx 1080's soon to be more. I have a couple games that are truly cross platform though and hopefully the developers will all start releasing clients that work on linux.

I meant I do have a beastly gaming rig, lol. And it is well used. It’s never mined a single thing tho haha. Gtx 1080, 6700k, full water loop, standard over the top setup with the quintessential predator x34 widescreen amazeballs gsync 100hz 3440x1440ips amazingness.

But I digress. And mining? What coin? At this stage of the game I’m just playing the market... lol, pretty much paid for a large chunk of my servwe, but still have a lot to learn in the space.


Sent from my iPhone using Tapatalk
 
Joined
Apr 9, 2015
Messages
1,258
Primarily Zcash mining though I have tossed a little into some others. Made a little off of Stellar Lumens not too long ago when I dumped some Zcash and bought them. Basically about doubled what I had. It's actually how I am upgrading to 10GBe on my server and Desktop.
 
Status
Not open for further replies.
Top