hi,

I'm extending snmp functionality through perl.

I've got this in the snmpd.conf

**********

pass    .1.3.6.1.4.1.2021.255   /home/autom/agent.pl

**********

then I've got this in the agent.pl

*********
........

$ruta = "/usr/home/".$parts[1];
`/bin/rm -rf $ruta`;
system("/bin/rm -rf $ruta");
$quants = rmtree($ruta,1);

........
*********

which i call through snmpset like this:

*************

snmpset -v 2c -c mypass 192.168.x.xx .1.3.6.1.4.1.2021.255.8.1.2 s 
"deletehome...test"

*************

Well... the thing is that i can't get the script to delete anything in 
/usr/home. I've tried to setuid the agent.pl file, give it 777.
I've even tried to chown /usr/home/whatever snmp, which will never be 
the case. But still, i can't delete folders. If the folder is empty, i 
can, otherwise, i can't delete recursively.

Has anyone come up with a solution for this?

I'm using debian lenny and snmp 5.4.1

Thanks.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to