check_disk: Permission denied redux II

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Zendan
Posts: 10
Joined: Wed Jan 29, 2020 7:03 am

check_disk: Permission denied redux II

Post by Zendan »

I was having two separate discussions that have since been closed… so here is the continuation. As background, I was having permission issues with an unofficial plugin. However, after some troubleshooting, we suspect it's a bug in nagios itself.

Essentially, it seems that nagios strips out supplementary group IDs. That is, I run the following in the terminal to reveal all the groups of the nagios user.

Code: Select all

$ sudo runuser -u nagios -- /usr/bin/id
uid=30(nagios) gid=30(nagios) groups=30(nagios),1050(media)
However, when I run the command through nagios, the GUI shows me

Code: Select all

uid=30(nagios) gid=30(nagios) groups=30(nagios)
The secondary group is missing, hence nagios complains of permission errors when attempting to access directories owned by media.

What's odd is that even if I change the primary gid of nagios, hence in the terminal

Code: Select all

$ sudo runuser -u nagios -- id
uid=30(nagios) gid=1050(media) groups=1050(media),30(nagios)
Nagios's GUI still reports the gid incorrectly as the old nagios, not the new media.
Locked