The new mongod.conf.subagent uses a UNIX socket definition of:
agentXSocket /tmp/agentx/master
On Ubuntu Server 12.04, This causes a directory structure permission/ownership as follows:
$ sudo ls -alh /tmp/agentx/ total 8.0K drwx------ 2 root root 4.0K Oct 30 13:29 . drwxrwxrwt 3 root root 4.0K Oct 30 13:29 .. srwxr-xr-x 1 root root 0 Oct 30 13:29 master $
Note that the /tmp/agentx is only user visible, and everything is owned by root. The more unexpected behavior, however, is that the permissions and ownership of the socket file are always reset back to root ownership and only user-writeable.
$ ls -lha /tmp/agentx/ total 8.0K drwx------ 2 ubuntu ubuntu 4.0K Oct 30 13:17 . drwxrwxrwt 3 root root 4.0K Oct 30 13:17 .. srwxrwxr-x 1 ubuntu ubuntu 0 Oct 30 13:17 master ubuntu@ip-10-239-24-41:~/mongodb$ sudo /etc/init.d/snmpd restart * Restarting network management services: ubuntu@ip-10-239-24-41:~/mongodb$ ls -lha /tmp/agentx/ total 8.0K drwx------ 2 ubuntu ubuntu 4.0K Oct 30 13:19 . drwxrwxrwt 3 root root 4.0K Oct 30 13:17 .. srwxr-xr-x 1 root root 0 Oct 30 13:19 master
This implies that the mongod running as a subagent will not be able to communicate through the UNIX socket.
The SNMP doc describes additional parameters (agentXPerms) to control the permission/ownership, so perhaps a documentation-only change. But also might be worth mentioning as a comment in the mongod.conf.subagent file itself.
http://net-snmp.sourceforge.net/docs/man/snmpd.conf.html
- related to
-
SERVER-11147 Split SNMP config to separate master & subagent files
- Closed