Concept for PHP Controlled, Privileged Execution (for a cPanel knockoff on Ubuntu Server)
I'd say: go run a gearman daemon as the correct user, and set some gearman workers as priviliged users up with something like supervisord. Both are in the Debian packages, so I assume they'll be in the Ubuntu packages also....

Do set up gearman with a maximum number of tries, or you could encounter a Poison Message problem.