# Help with uploading and owner and group

**URL:** <https://forum.kirupa.com/t/help-with-uploading-and-owner-and-group/259611>\
**Category:** programming\
**Created:** [May 7, 2008, 5:37am UTC](https://forum.kirupa.com/t/help-with-uploading-and-owner-and-group/259611 "2008-05-07T05:37:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theSchtickler](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@theSchtickler](https://forum.kirupa.com/u/theSchtickler)\
**Post date:** [May 7, 2008, 5:37am UTC](https://forum.kirupa.com/t/help-with-uploading-and-owner-and-group/259611/1 "2008-05-07T05:37:00Z")

</div>

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
<?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
