Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#79135 - [netdata] debugfs.plugin should run with CAP_DAC_READ_SEARCH

Attached to Project: Arch Linux
Opened by Konstantin Shalygin (k0ste) - Tuesday, 18 July 2023, 13:48 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 17 August 2023, 10:36 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

```
Jul 18 20:44:30 k0ste.ru systemd[1]: netdata.service: Consumed 5.899s CPU time.
Jul 18 20:44:30 k0ste.ru systemd[1]: Started Real time performance monitoring.
Jul 18 20:44:30 k0ste.ru netdata[3886160]: CONFIG: cannot load cloud config '/var/lib/netdata/cloud.d/cloud.conf'. Running with internal defaults.
Jul 18 20:44:30 k0ste.ru netdata[3886160]: 2023-07-18 20:44:30: netdata INFO : MAIN : CONFIG: cannot load cloud config '/var/lib/netdata/cloud.d/cloud.conf'. Running with interna
l defaults.
Jul 18 20:44:31 k0ste.ru apps.plugin[3886341]: PROCFILE: Cannot open file '/etc/netdata/apps_groups.conf'
Jul 18 20:44:31 k0ste.ru apps.plugin[3886341]: Cannot read process groups configuration file '/etc/netdata/apps_groups.conf'. Will try '/usr/lib/netdata/conf.d/apps_groups.conf'
Jul 18 20:44:31 k0ste.ru apps.plugin[3886341]: Loaded config file '/usr/lib/netdata/conf.d/apps_groups.conf'
Jul 18 20:44:31 k0ste.ru apps.plugin[3886341]: started on pid 3886341
Jul 18 20:44:31 k0ste.ru apps.plugin[3886341]: set name of thread 3886360 to APPS_READER
Jul 18 20:44:31 k0ste.ru debugfs.plugin[3886358]: debugfs.plugin should run with CAP_DAC_READ_SEARCH.
Jul 18 20:44:31 k0ste.ru debugfs.plugin[3886358]: debugfs.plugin should either run as root (now running with uid 134, euid 134) or have special capabilities. Without these, debugf
s.plugin cannot access /sys/kernel/debug. To enable capabilities run: sudo setcap cap_dac_read_search,cap_sys_ptrace+ep /usr/lib/netdata/plugins.d/debugfs.plugin; To enable setuid
to root run: sudo chown root:netdata /usr/lib/netdata/plugins.d/debugfs.plugin; sudo chmod 4750 /usr/lib/netdata/plugins.d/debugfs.plugin;
Jul 18 20:44:31 k0ste.ru perf.plugin[3886362]: no charts enabled - nothing to do.
Jul 18 20:44:32 k0ste.ru cups.plugin[3886357]: cups daemon is not running. Exiting!
Jul 18 20:44:32 k0ste.ru apps.plugin[3886341]: Using now_boottime_usec() for uptime (dt is 0 ms)
Jul 18 20:44:42 k0ste.ru cgroup-network[3886534]: setresuid(0, 0, 0) failed.
```

`sudo setcap cap_dac_read_search,cap_sys_ptrace+ep /usr/lib/netdata/plugins.d/debugfs.plugin` fixed this issue

Seems should be added to netdata.install
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Thursday, 17 August 2023, 10:36 GMT
Reason for closing:  Fixed
Comment by loqs (loqs) - Tuesday, 18 July 2023, 14:36 GMT
Or the .install file could be dropped and the capabilities set in the PKGBUILD as as makepkg / pacman now fully support xattrs.
Comment by Sven-Hendrik Haase (Svenstaro) - Sunday, 13 August 2023, 21:45 GMT
Alright, check the new package please.
Comment by Konstantin Shalygin (k0ste) - Monday, 14 August 2023, 05:11 GMT
Better, seems also need caps for perf plugin

https://github.com/netdata/netdata/blob/master/netdata.spec.in#L886-L894


```
Aug 14 12:05:14 k0ste.ru netdata[2786319]: PLUGINSD: 'host:k0ste.ru', '/usr/lib/netdata/plugins.d/perf.plugin' (pid 2786531) disconnected aft
er 0 successful data collections (ENDs).
Aug 14 12:05:14 k0ste.ru netdata[2786319]: child pid 2786531 exited with code 1.
Aug 14 12:05:14 k0ste.ru netdata[2786319]: PLUGINSD: 'host:k0ste.ru', '/usr/lib/netdata/plugins.d/perf.plugin' (pid 2786531) exited with erro
r code 1 and haven't collected any data. Disabling it.
```
Comment by Sven-Hendrik Haase (Svenstaro) - Wednesday, 16 August 2023, 17:10 GMT
Alright, try 1.42.1.
Comment by Konstantin Shalygin (k0ste) - Thursday, 17 August 2023, 09:44 GMT
I think this was fixed now

Loading...