I am running Ubuntu 17.04 with Syncthing v0.14.40. I had everything working nicely, but I ran into some issues and had to reinstall Syncthing (and the desktop environment and a few other things). Since then, I’m unable to get Syncthing to work properly.
I installed the software using apt and connected to another machine. When the other machine wants to share a folder and the local machine prompts me to add a new folder, I click Add. I point it to a path that does not exist in my user’s home directory (which is what I had set up before). Then I get this error:
2017-11-16 14:06:16: Loading ignores: open /home/MyName/Synchronized/Chromebook/.stignore: permission denied
2017-11-16 14:06:16: Error on folder “Chromebook” (FolderID): folder path missing
Here’s what I’ve tried so far:
Point to a folder that already exists
Point to a folder that doesn’t exist, but is the child of a folder that exists
Point to a folder that doesn’t exist, and the parent doesn’t exist, but the grandparent exists
Manually changing the permissions on the folder to allow the syncthing user to rwx
Manually changing the ownership on the folder to the syncthing user and group
Manually create the .stfolder file, with permissions set
Manually create the.stignore folder
If I sync to a folder in the syncthing user’s home directory, it appears to work just fine. So the connection to the remote server is good. But something got screwy with the permissions that I can’t quite figure out. I’ve even tried to clean up the installation and start over, but I may be leaving some artifact behind that’s still causing me grief.
Given that these are presumably different users, have you done whatever magic you need to do in terms of adding them to a common group, making sure the files and directories are owned by that group and group writable, setting the group sticky bit, etc?
(Also, is it worth the trouble? If the Syncthing user mostly can access the files owned by your own user it would be much simpler to run Syncthing as yourself, I think.)
I’d be happy to run Syncthing as myself, but I’m not sure how to do that. The instructions that I have (which should be the same as what I did before) are:
sudo apt-get install syncthing
sudo useradd -r syncthing -m -d /home/syncthing
sudo systemctl enable syncthing@syncthing.service
sudo systemctl start syncthing@syncthing.service
First, install the software. Then create the syncthing user. Then enable and start the service. So if I want to run this as myself, I can drop step 2, but what change(s) do I make to steps 3 and 4 to get it to run as me? Or is there something else that I need to change?
I expect you just systemctl start syncthing@yourself.service (where yourself is your actual username…) without any sudo. But there are others here with more systemd knowledge. If you want to retain the old device ID you’ll need to copy the files in ~syncthing/.config/syncthing. Try it out by just starting it manually: syncthing.