setcap_netdata() { # https://github.com/netdata/netdata/tree/master/collectors/apps.plugin#permissions setcap cap_dac_read_search,cap_sys_ptrace+ep /usr/lib/netdata/plugins.d/apps.plugin || chmod 1755 /usr/lib/netdata/plugins.d/apps.plugin } post_install() { setcap_netdata } post_upgrade() { setcap_netdata }