syncthing as service with multiple user


the goal is to sync /var/www/html folder

/var/www is owned by root

/var/www/html is owned by ftpusers group

I setup syncthing as a service


if I use admin user it does not have permissions on the folder => error

If I use root user it works (but not secure)

but if I want to use a ftp chrooted user (with /sbin/false in passwd file) it does not work

it does not even create the config.xml file, not even the .config directory

any idea how to achieve this ?


There should be something in syncthings log (if that script is configured to save a log…)

Most likely that user does not have a home folder or no permission to write in it and thus it can’t create it. You can create ~/.config/syncthing manually (beloning to the user that should run syncthing) or use -home="/some/path" to use another folder for the config.

Being root, can’t you “su - -s /bin/bash ftp”? Whoami should reply “ftp”. Check your $HOME is where it should be, then you can run syncthing for the 1st time, stop it and finally edit the config.xml file.

“cannot execute /sbin/false no such file or directory”

probably becos the ftp user has its shell disactivated

I’ll try creating a syncthing regular user , adding it to ftpusers group

ok it works

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.