I don’t find any solution to this problem.
For information : syncthing v1.3.2 “Fermium Flea” (go1.13.4 linux-386) teamcity@build.syncthing.net 2019-11-24 08:33:58 UTC
“marc” is an actual user on a debian with no sudo rights. marc can launch syncthing as a user through a terminal.
Here is my service file : syncthing@marc.service :
[Unit]
Description=Syncthing - Open Source Continuous File Synchronization for %I
Documentation=man:syncthing(1)
After=network.target
[Service]
User=%I
ExecStart=/usr/local/bin/syncthing -no-browser -no-restart -logflags=0
Restart=on-failure
SuccessExitStatus=3 4
RestartForceExitStatus=3 4
# Hardening
ProtectSystem=full
PrivateTmp=true
SystemCallArchitectures=native
MemoryDenyWriteExecute=true
NoNewPrivileges=true
[Install]
WantedBy=multi-user.target
When starting it with “sudo systemctl start syncthing@marc.service”, i get the following logs from systemd :
déc. 09 21:55:41 syncdz systemd[1]: Started Syncthing - Open Source Continuous File Synchronization for marc.
déc. 09 21:55:41 syncdz systemd[1]: syncthing@marc.service: Main process exited, code=killed, status=31/SYS
déc. 09 21:55:41 syncdz systemd[1]: syncthing@marc.service: Failed with result 'signal'.
déc. 09 21:55:41 syncdz systemd[1]: syncthing@marc.service: Service RestartSec=100ms expired, scheduling restart.
déc. 09 21:55:41 syncdz systemd[1]: syncthing@marc.service: Scheduled restart job, restart counter is at 1.
déc. 09 21:55:41 syncdz systemd[1]: Stopped Syncthing - Open Source Continuous File Synchronization for marc.
and from systemctl status :
cedric@syncdz:~$ sudo systemctl status syncthing@marc.service
● syncthing@marc.service - Syncthing - Open Source Continuous File Synchronization for marc
Loaded: loaded (/etc/systemd/system/syncthing@marc.service; disabled; vendor preset: enabled)
Active: failed (Result: signal) since Mon 2019-12-09 22:26:16 CET; 13s ago
Docs: man:syncthing(1)
Process: 1259 ExecStart=/usr/local/bin/syncthing -no-browser -no-restart -logflags=0 (code=killed, signal=SYS)
Main PID: 1259 (code=killed, signal=SYS)