summaryrefslogtreecommitdiffstats
path: root/netdata-installer.sh
diff options
context:
space:
mode:
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-xnetdata-installer.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh
index 6161ca4ba..e5fe2998b 100755
--- a/netdata-installer.sh
+++ b/netdata-installer.sh
@@ -1239,6 +1239,21 @@ if [ "$(id -u)" -eq 0 ]; then
fi
fi
+ if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/systemd-journal.plugin" ]; then
+ run chown "root:${NETDATA_GROUP}" "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/systemd-journal.plugin"
+ capabilities=0
+ if ! iscontainer && command -v setcap 1> /dev/null 2>&1; then
+ run chmod 0750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/systemd-journal.plugin"
+ if run setcap cap_dac_read_search+ep "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/systemd-journal.plugin"; then
+ capabilities=1
+ fi
+ fi
+
+ if [ $capabilities -eq 0 ]; then
+ run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/systemd-journal.plugin"
+ fi
+ fi
+
if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/freeipmi.plugin" ]; then
run chown "root:${NETDATA_GROUP}" "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/freeipmi.plugin"
run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/freeipmi.plugin"
@@ -1290,6 +1305,7 @@ if [ "$(id -u)" -eq 0 ]; then
run chown "root:${NETDATA_GROUP}" "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/local-listeners"
run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/local-listeners"
fi
+
else
# non-privileged user installation
run chown "${NETDATA_USER}:${NETDATA_GROUP}" "${NETDATA_LOG_DIR}"