(I started this on the -users list but it seems more appropriate here now.)

> > In http://sourceforge.net/mailarchive/message.php?msg_id=9547341 
> > I asked how to set ownership of persistent files.  I must have 
> > gotten an answer (or figured it out) because my v5.1.1-based 
> > system has been working forages.  But I'm trying to move to v5.2.2
> > now and I'm seeing the same problem.  The e-mail archives shows 
> > now answers to my question.  Help.
> > 
> > On a related matter, wouldn't it be nice if PERSISTENT_MASK could 
> > be set with a configure option like --with-persistent-directory?
> 
> I also found
> http://sourceforge.net/mailarchive/message.php?msg_id=9550619 which
> describes a patch I'd made to read_config.c in v5.1.1.  I'd like to
> avoid the patch in v5.2.2 if I can but with v5.2.2 modifified with
> PERSISTENT_MASK 007, I still get the file owned by root/root, not by
> root/agentgroup (where 'agentgroup' is found in 
> /usr/share/snmp/snmpd.conf).

More research makes this look even weirder.  The agent is seeing the
admingroup config token and properly processing it.  If I `killall
snmpd`, the persistent store is rewritten with the desired group. 
HOWEVER, if I then reboot, something -- snmpd? -- changes the ownership
of the persistent store back to root/root.  I think it may be rewriting
the file before the admingroup token is processed (to update engineBoots
or oldEngineID?).  The timeline is something like:

  0. /var/net-snmpd/snmpd.conf is owned by root/admin
  1. snmpd is started
  2. /var/net-snmpd/snmpd.conf is owned by root/admin
  ... no interesting snmpd events but _something_ changes the ownership
  n. /var/net-snmpd/snmpd.conf is owned by root/root
  o. killall snmpd
  p. /var/net-snmpd/snmpd.conf is owned by root/admin

I'm looking into it but feedback from others more knowledgable about the
code would be welcome.



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to