Question about mkdir() on apache
Posted: Wed May 21, 2008 6:13 pm
Hi,
I'm having problems implementing a simple upload script which creates a directory and uploads images to that folder. mkdir() works but the uid and gid are owned by apache. As a result the newly created folder cannot be accessed. I have scowered the internet for documentation on this subject but to no avail.
My code is more complicated but for the purpose of testing I have created a very simple page with code as follows:
Has anyone else encountered this problem and if so is there a solution?
Thanks in advance
I'm having problems implementing a simple upload script which creates a directory and uploads images to that folder. mkdir() works but the uid and gid are owned by apache. As a result the newly created folder cannot be accessed. I have scowered the internet for documentation on this subject but to no avail.
My code is more complicated but for the purpose of testing I have created a very simple page with code as follows:
Code: Select all
<?php
mkdir("/var/www/vhosts/mirandamoser.com/httpdocs/author/test", 0777);
?>
Thanks in advance