Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 589774 - net-p2p/syncthing: inconsistent default config directory between OpenRC and systemd
Summary: net-p2p/syncthing: inconsistent default config directory between OpenRC and s...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Marek Szuba
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2016-07-26 20:27 UTC by Alex Ford
Modified: 2017-05-22 10:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch /etc/init.d/syncthing to move the -home directory, fixing permissions (syncthing.patch,504 bytes, patch)
2016-07-26 20:27 UTC, Alex Ford
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Ford 2016-07-26 20:27:14 UTC
Created attachment 441656 [details, diff]
Patch /etc/init.d/syncthing to move the -home directory, fixing permissions

Seeing as the developers are adamant on having the -home directory 700 [1], I would like to suggest placing the -home in /var/lib/syncthing/.config

This way /var/lib/syncthing can remain at whatever permissions the admin wishes, while still allowing permissions to keep "confidential information" secure.

A suggested patch for the service is attached that accomplishes this.

[1] https://github.com/syncthing/syncthing/issues/3434
Comment 1 Marek Szuba archtester gentoo-dev 2017-04-28 10:53:23 UTC
Seeing as /var/lib/syncthing is the *configuration directory* of Gentoo installation of Syncthing, I am not quite convinced placing shares inside that directory is a good idea - it seems like asking for accidental leakage of the aforementioned sensitive data.

That said, there is in fact a different reason for why we shouldn't pass /var/lib/syncthing itself as -home - this is only done in the OpenRC init script. The systemd unit does not set -home so for the same user, Syncthing launched via systemd uses /var/lib/syncthing/.config/syncthing instead. Such inconsistency should be avoided - and given systemd units come from upstream, it is the OpenRC script that should be updated.
Comment 2 Marek Szuba archtester gentoo-dev 2017-05-22 10:42:15 UTC
As of commit 082959243dca77d3c4d00100e86555650fc5b439, the default Syncthing configuration directory used by /etc/init.d/syncthing is /var/lib/syncthing/.config/syncthing - i.e. the same as for the upstream-provided systemd unit syncthing@syncthing.service. Thanks for bringing this to my attention!