I try to create dir and sub-dir on the fly. My code is:
<?php
$documentRoot = "my_docs_root_path";
if(!is_dir($documentRoot."/dir1"))
{
mkdir($documentRoot."/dir1", 0777);
}
if(!is_dir($documentRoot."/dir1/subdir1"))
{
mkdir($documentRoot."/dir1/subdir1", 0777);
}
?>
And the result is:
Warning: mkdir() [function.mkdir]: SAFE MODE Restriction in effect. The script whose uid/gid is user1_pid/user1_gid is not allowed to access my_docs_root_path/dir1 owned by uid/gid nobody_uid/nobody_gid in test.php on line 10
I understood what's happening. I can make a new dir under my path but the owner of the new dir is web user. After this, when I try to make the sub-dir in this, I have no permission!!
Do I right?
But.... how can I solve this?? How can I make the subdir1 under the web user dir??
Thanks,
roteee