I normally do snmptraps and other net-snmp commands without problems with root session, but when i try to execute same commads with a normal user i obtain follow errors:

Cannot rename /var/lib/net-snmp/snmpapp.conf to /var/lib/net-snmp/snmpapp.0.conf

Cannot unlink /var/lib/net-snmp/snmpapp.conf

read_config_store open failure on /var/lib/net-snmp/snmpapp.conf

read_config_store open failure on /var/lib/net-snmp/snmpapp.conf

read_config_store open failure on /var/lib/net-snmp/snmpapp.conf

I try to search for a .conf file for add the necessary permisions to all net-snmp to a normal user but i don't find it exactly what to do, for fixing this problem.

Thank you for your help.


I have faced similar issue and resolved it by following a discussion at http://sourceforge.net/p/net-snmp/bugs/1706/. I think the pith of the problem has to do with running the snmptrap command with an unprivileged user. In which case a user specific configuration should be created by adding the following line:

persistentDir /home/user/.snmp_persist

in ~/.snmp/snmp.conf

After you run snmptrap you should see something similar to:

Creating directory: /home/user/.snmp_persist

I hope this helps.


A quick look at the snmptrapd man page shows the following:

Note: the default is to listen on UDP port 162 on all IPv4 interfaces. Since 162 is a privileged port, snmptrapd must typically be run as root.

I am not familiar with snmpapp.conf but I would start with looking at the permissions for /var/lib/net-snmp/snmpapp.conf. What distro are you running and are you using any sort of frontend to SNMP?

  • Using fedora core 19, i don't use a frontend snmp i sent snmtptraps automatically using bash scripts. – Rebujacker Aug 13 '14 at 12:51
  • OK. Is the output above from your scripts? It looks like the snmpapp file is being renamed then replaced with something different or a modified version of the original. This would point to an issue with permissions. With RedHat flavored distros SELinux could also be an issue. You could use setfacl to give a normal account write privileges on the required files to see if that fixes things. – chuck Aug 13 '14 at 13:27

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.