Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to exec command to perform checks through snmp.

I am on Debian 6.0

Here is my snmpd.conf file

rwcommunity public
syslocation "Blah
sysdescr "Syslog Domain Server"

disk /

load 5 10 10

#exec /usr/bin/python /usr/local/domain/tools/
exec /usr/bin/python /tmp/

Here is the output of snmpget:

snmpget -Of -cpublic -v1 belleville
.iso. = STRING: "/usr/bin/python: can't open file '/tmp/': [Errno 13] Permission denied"

I don't understand the permission issue, as the rights on the file are 711 and owner root:root, located in /tmp folder. Anyway, this script is executed by root user, isn't it? So 700 should be enough anyway? This makes me think that this does not look like a permission trouble, even with this error message.

I hope someone has ever met this issue, and would be able to give me some advice :/

Thanks a lot for any piece of advice :)

share|improve this question

You've said that the script is located in /tmp; is your /tmp partition mounted noexec by any chance? That can be an occasional source of confusion.

share|improve this answer
Hi, Thx for you answer, but there is nothing like that in my /tmp dir – philippe Jul 19 '11 at 15:41

snmpd might run with a different accout than root as well.

Check out by executing a test-script that executes "id".

share|improve this answer
When I change the rights from 711 to 771, I still get the same problem. I have to change the rights to 777 to have an other output: – philippe Jul 19 '11 at 16:06
Sounds as if I am right. So what is the output of "id" after you did your 777? – Nils Jul 19 '11 at 19:58

Not sure, that it is exactly your problem. We ran into the same one but with extend, where name is required and OID isn't. So our misconfigured snmp was executing only the last part of command line which wasn't executable file.

Your variant:

exec /usr/bin/python /tmp/

will define /usr/bin/python and name and try to execute only /tmp/ without interpreter

Correct one with extension name check-syslog:

exec check-syslog /usr/bin/python /tmp/
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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