I guess I was not clear enough in my first post above, The chown can only be run by superuser and using sudo is too much of a security problem on my server, is there any workarounds that anyone here has done, (calling a script, using a .htaccess file, etc...) I would rather not use cgi for this, but calling say a perl script would be fine. I didn't know if you could run a script (php, or perl, etc...) as a different user.
The commands I need to run are not ones that need root access but that do run under a different user, i.e creating a new user in vpopmail or something like that. I am programming a custom interface for a virtual hosting server.