summaryrefslogtreecommitdiffstats
path: root/packaging/makeself
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2023-06-22 07:26:14 -0400
committerGitHub <noreply@github.com>2023-06-22 07:26:14 -0400
commit8b384e402b5cffb295d56eb85ed6d0bfbc826bb2 (patch)
tree608d4d7cabe25e3dbb8a1fbf837ce8f1a236acbf /packaging/makeself
parent39c628ca09ab1f264ec0e1c2f6a73d221fd36796 (diff)
Fix handling of plugin ownership in static builds. (#15230)
* Fix handling of plugin ownership in static builds. * Address review feedback. * Update packaging/makeself/install-or-update.sh --------- Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Diffstat (limited to 'packaging/makeself')
-rwxr-xr-xpackaging/makeself/install-or-update.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/packaging/makeself/install-or-update.sh b/packaging/makeself/install-or-update.sh
index 636fb61109..f8b32ed740 100755
--- a/packaging/makeself/install-or-update.sh
+++ b/packaging/makeself/install-or-update.sh
@@ -164,10 +164,21 @@ run chmod g+rx,o+rx /opt
run find /opt/netdata -type d -exec chmod go+rx '{}' \+
run chown -R ${NETDATA_USER}:${NETDATA_GROUP} /opt/netdata/var
+if [ -d /opt/netdata/usr/libexec/netdata/plugins.d/ebpf.d ]; then
+ run chown -R root:${NETDATA_GROUP} /opt/netdata/usr/libexec/netdata/plugins.d/ebpf.d
+fi
+
# -----------------------------------------------------------------------------
progress "changing plugins ownership and permissions"
+for x in apps.plugin perf.plugin slabinfo.plugin debugfs.plugin freeipmi.plugin ioping cgroup-network ebpf.plugin nfacct.plugin xenstat.plugin python.d.plugin charts.d.plugin go.d.plugin ioping.plugin cgroup-network-helper.sh; do
+ f="usr/libexec/netdata/plugins.d/${x}"
+ if [ -f "${f}" ]; then
+ run chown root:${NETDATA_GROUP} "${f}"
+ fi
+done
+
if command -v setcap >/dev/null 2>&1; then
run setcap "cap_dac_read_search,cap_sys_ptrace=ep" "usr/libexec/netdata/plugins.d/apps.plugin"
run setcap "cap_dac_read_search=ep" "usr/libexec/netdata/plugins.d/slabinfo.plugin"
@@ -183,7 +194,6 @@ if command -v setcap >/dev/null 2>&1; then
else
for x in apps.plugin perf.plugin slabinfo.plugin debugfs.plugin; do
f="usr/libexec/netdata/plugins.d/${x}"
- run chown root:${NETDATA_GROUP} "${f}"
run chmod 4750 "${f}"
done
fi
@@ -192,7 +202,6 @@ for x in freeipmi.plugin ioping cgroup-network ebpf.plugin nfacct.plugin xenstat
f="usr/libexec/netdata/plugins.d/${x}"
if [ -f "${f}" ]; then
- run chown root:${NETDATA_GROUP} "${f}"
run chmod 4750 "${f}"
fi
done