snmpd: cannot open /proc/net/dev or /proc/net/snmp

I get the following message in syslog from snmpd:

Jun 22 17:10:43 test snmpd[9508]: cannot open /proc/net/snmp ...
Jun 22 17:10:45 test snmpd[9508]: cannot open /proc/net/dev ...

The problem is, that snmpd has no rights to access the proc-filesystem to gather information about interfaces and so.

check the rights of the user and group of snmpd:

root@test:~$ cat /proc/$(pidof snmpd)/status | grep -i -e "^[u|g]id"
Uid:    106     106     106     106
Gid:    0       0       0       0

In my case, the problem was that i was running a grsec kernel (stupid default kernel of my root) and access to proc by users was permitted by the kernel.
to change this, you must change your kernel config (see grsecurity for instructions).

another solution is to change the user or group to a special grsec user/group. but event this is not working correct under some distributions, but patching the source code of snmpd may help.

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *

*

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">