I have the following problem when i try to create a directory on a remote server:
When writing a directory the owner of the directory is set to "apache". From then on I can't see the directory in my ftp-client.
However on the hosting company's control panel i can see the files with the file manager. But I can't delete them because the owner and group is set to apache.
The only I would like is that when my script is creating the directory it also sets the owner and the group to my user details.

The script I use the make the directory is this:

PHP Code:
$checkdir "/usr/local/psa/home/vhosts/somesite.be/subdomains/test/httpdocs/img/pic/".$cat."/".$project_id;
if (!
file_exists($checkdir)) {
mkdir ($checkdir0666);