Apache and most FTP servers have an option in their config files to be told what user to run as, they are then startes as root by init and then change their uid after they finish any priviledged operations.
Sudo is probably your best bet, Debian has a tool called start-stop-daemon that lets you specify uid, gid, chroot, etc but I don't know if Gentoo has anything similar.
|