Article 6EQZ1 Newbie question regarding user/group permissions (syncthing daemon)

Newbie question regarding user/group permissions (syncthing daemon)

by
drew_gui
from LinuxQuestions.org on (#6EQZ1)
When installing syncthing from slackbuilds.org, the slackbuild script has me first create a syncthing group and user, with home in /var/lib/syncthing:

Code:# groupadd -g 307 syncthing
# useradd -d /var/lib/syncthing -g syncthing -s /bin/bash -u 307 syncthingThen after installation, it provides me with an rc.syncthing file in /etc/rc.d so I have the option of running the service system-wide as a daemon, instead of on a per-user basis (where I suppose you would potentially have multiple instances)

I understand that I can just autostart syncthing through my desktop environment or ~/.local/share/autostart or whatever else, so getting the program to run on a per-user basis isn't really the issue. I'm mostly just trying to understand what the setup would look like if I opted to go the daemon route.

When I manually start rc.syncthing as root, I am able to pull up the web GUI on my regular user account without any issues, but the default folder used by the tool is /var/lib/syncthing/Sync which is owned by syncthing:syncthing as mentioned earlier. Sharing the syncthing folder with the user accounts on my other devices through the syncthing GUI doesn't work, because they obviously don't have permissions. And the same goes for the reverse situation, when the individual users create their own Sync folders in their home directories the syncthing user cannot access them (this all makes sense to me)

What is the correct process I should be following to share access? Is it that each potential user would need to be added to group syncthing, and each would create their own /home/myuser/Sync, then change ownership on each of those folders to myuser:syncthing, as well as permissions (I assume 770)? If I'm understanding correctly, each user's home folder would end up contain something like this:

Code:myuser@host:~$ ls -al | grep Sync
drwxrwx--- 3 myuser syncthing 4096 Sep 13 06:42 Sync/Again this is not really meant to be a syncthing-specific question (I am the only user on this machine and have no problem running the tool as a user service), I am just trying to understand permissions and ownership a little better in this case
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments