I think be default, files that PHP creates have the owner 99. Is there a way to specify the username that is used when creating files with PHP?
its usually "nobody" but you can attempt to change the owner using chown() check the manual for more on chown().
Also check chgrp()