collectd service: change /var/lib/collectd perms: 700 -> 755

The collectd service runs as an unprivileged user by default, so it does
not leak more information to its data directory than any user can obtain
elsewhere by other means.

If people are running it as root and are worried about information leak,
we can add collectd group and set perms to 750.

CC @offlinehacker.

Fixes #21198.
This commit is contained in:
Bjørn Forsman 2016-12-16 22:28:58 +01:00
parent e18dac705a
commit ebe67d69d0

View File

@ -108,7 +108,8 @@ in {
};
preStart = ''
mkdir -m 0700 -p ${cfg.dataDir}
mkdir -p ${cfg.dataDir}
chmod 755 ${cfg.dataDir}
install -D /dev/null ${cfg.pidFile}
if [ "$(id -u)" = 0 ]; then
chown -R ${cfg.user} ${cfg.dataDir};