Help with uploading and owner and group

Hi there,

So here’s the low down. I’m controlling a couple of PHP scripts from Flash, but I don’t think that has anything to do with it… If I have a directory on the server already, I can upload to it fine. The problem comes when I use the following script to create a new directory…

<?php
mkdir($_POST["dirName"], 0777);
chmod($_POST["dirName"], 0777);
echo('yep');
?>

So, the dir has full write permissions, except I can’t upload anything into it? If I use my FTP program to create a dir, I can upload into it fine. So what I have worked out (please correct me if I am wrong) is that it seems to be an issue with owner and group…

When the script creates the dir, its owner/group is ‘httpd’, but when my FTP program does it, the owner/group is blank.

Anyone got any ideas? Can I change the owner/group with a script?

Thanks