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".
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.
This all worked, but the service wouldn't start again:
So, right or wrong, I
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
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%.
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
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%.