I'm currently writing a web based application that will be doing some basic filesystem functions. However, for them to execute properly and not break things, I need to be able to set the UID and GID that the process should run as.
Some of these will need brief sudo access, and some, lower level users. I know it isn't the safest thing in the world, but it is not going to be publicly accessable on any computer, so security isn't one of my major concerns.
Does anyone know of any methods to make an exec(EscapeShellCmd("my command here")); execute as a seperate user:group, and not the www user that Apache is running under?
Any help would be greatly appreciated.