# Folder permissions

**URL:** <https://forum.kirupa.com/t/folder-permissions/275063>\
**Category:** programming\
**Created:** [November 8, 2008, 4:30pm UTC](https://forum.kirupa.com/t/folder-permissions/275063 "2008-11-08T16:30:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![philsbury](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@philsbury](https://forum.kirupa.com/u/philsbury)\
**Post date:** [November 8, 2008, 4:30pm UTC](https://forum.kirupa.com/t/folder-permissions/275063/1 "2008-11-08T16:30:21Z")

</div>

Hi,

I’m developing a system where a directory is created for a particular user in which images etc are stored. I’ve managed to create the directories ok, but the owner is set to 99 as opposed to me, the result being I can’t then remove the folders or their contents. Is there a way I can change the owner through PHP after the file is created?

I’ve tried using CHMOD but its not done the trick (code below)

```php
chmod('path/to/mydir', 4755);

```

(I found the 4755 on another forum)

Cheers  
Phil
