After receiving an uploaded file and moving it to its target directory, using PHP's move_uploaded_file()
function, the file has the owner and group "www:wheel", ie. that of Apache. I want to change the group to "admin", but chgrp()
says I (or rather, www) don't have permission to do so. What would be a smart solution so the files become readable by a user of the admin group?
I assume making user "www" a member of the "admin" group would be insecure, giving Apache to many rights. Or is it?
Environ is Apache 2, PHP5 on Mac OS X Server.