aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorAndré Colomb <src@andre.colomb.de>2022-09-13 10:00:47 +0200
committerGitHub <noreply@github.com>2022-09-13 10:00:47 +0200
commit3e99ddfbf04e431d93a6b55c2aec7bf3cff11ba9 (patch)
treeb1a6113307a130f63c22f76b5390f3210df905a9 /etc
parent43f0e5c91d78802662a5d10b77684c5324962ea1 (diff)
downloadsyncthing-3e99ddfbf04e431d93a6b55c2aec7bf3cff11ba9.tar.gz
syncthing-3e99ddfbf04e431d93a6b55c2aec7bf3cff11ba9.zip
etc/linux-systemd: Mention AmbientCapabilities for syncOwnership. (#8536)
Add a commented entry to the systemd service file templates to point the user in the right direction when using syncOwnership and starting via systemd. Which is more upgrade-friendly than setting caps on the executable directly, as mentioned in the docs.
Diffstat (limited to 'etc')
-rw-r--r--etc/linux-systemd/README.md2
-rw-r--r--etc/linux-systemd/system/syncthing@.service4
-rw-r--r--etc/linux-systemd/user/syncthing.service4
3 files changed, 9 insertions, 1 deletions
diff --git a/etc/linux-systemd/README.md b/etc/linux-systemd/README.md
index 57cfe8c05..96aba562c 100644
--- a/etc/linux-systemd/README.md
+++ b/etc/linux-systemd/README.md
@@ -5,4 +5,4 @@ This directory contains configuration files for running Syncthing under the
systemd user service. For further documentation take a look at the [systemd
section][1] on https://docs.syncthing.net.
-[1]: https://docs.syncthing.net/users/autostart.html#using-systemd
+[1]: https://docs.syncthing.net/users/autostart#using-systemd
diff --git a/etc/linux-systemd/system/syncthing@.service b/etc/linux-systemd/system/syncthing@.service
index b76b0d22f..bbdf0d1f5 100644
--- a/etc/linux-systemd/system/syncthing@.service
+++ b/etc/linux-systemd/system/syncthing@.service
@@ -20,5 +20,9 @@ SystemCallArchitectures=native
MemoryDenyWriteExecute=true
NoNewPrivileges=true
+# Elevated permissions to sync ownership (disabled by default),
+# see https://docs.syncthing.net/advanced/folder-sync-ownership
+#AmbientCapabilities=CAP_CHOWN CAP_FOWNER
+
[Install]
WantedBy=multi-user.target
diff --git a/etc/linux-systemd/user/syncthing.service b/etc/linux-systemd/user/syncthing.service
index d1b68b5ba..18078d05f 100644
--- a/etc/linux-systemd/user/syncthing.service
+++ b/etc/linux-systemd/user/syncthing.service
@@ -16,5 +16,9 @@ SystemCallArchitectures=native
MemoryDenyWriteExecute=true
NoNewPrivileges=true
+# Elevated permissions to sync ownership (disabled by default),
+# see https://docs.syncthing.net/advanced/folder-sync-ownership
+#AmbientCapabilities=CAP_CHOWN CAP_FOWNER
+
[Install]
WantedBy=default.target