I have a server running Ubuntu LTS 8.04 and i would like to change the user apache(+php) runs as.
Basically, the below script should return "ftpuser".
$cmd = "whoami";
$output = shell_exec($cmd);
And so far, i have been completely failing at doing this.
I have tried altering the /etc/apache2/envvars but this doesnt change anything, even after rebooting server or restarting apache.
I have to do this so i can delete files apache creates through php ShellExec from an FTP client. (and php needs to be able to delete files that where uploaded through ftp with ShellExec('rm '.$filename);
Any help would be greatly appreciated