in reply to perl script using sudo

sudo requires a password, unless you explicitly set it up in the sudoers file not to. My first guess is that when the script runs it doesn't feed a password to sudo (that's more than a guess, I can see that the script doesn't) so the command fails. The guess part is that the call to sudo will either time out or go away when called from within Perl.

In addition I see future problems when you try to run this as a CGI program. The user that Apache runs under (guessing that you're using Apache as it looks like you're on a *n*x environment) doesn't have permission to run sudo at all.

I don't see this as a Perl or permissions error -- at least, not a file permissions error. First, I would ensure that the ntop shell script has the proper shebang line, and set it to be executable. Then I'd go over it with a fine tooth comb and see if it's secure. Then ask some others to take a look at it to be sure. When you're sure it doesn't have any security holes, you can set it up to run under sudo without a password in the sudoers file. Or find a different way to do what it is that you're doing.