Greetings,

I need to create some directories on the server using script. My server is
having safe _mode 'On'. The script is giving me some warning like this.

Warning: mkdir(): SAFE MODE Restriction in effect. The script whose uid is
10029 is not allowed to access
/home/httpd/vhosts/***......****/httpdocs/w4/full1/1 owned by uid 48 in
/home/httpd/***......****/httpdocs/w4/dir.php on line 23

<?
$uid=1;
$c_id=1;

if (!is_dir("full1/$uid"))
{
 echo "creating full1/$uid";
 $oldmask = umask(0);
 mkdir("full1/$uid",0777);
 umask($oldmask);
}
if (!is_dir("thumb/$uid"))
{
 echo "<br>creating thumb/$uid";
 $oldmask = umask(0);
 mkdir("thumb/$uid",0777);
 umask($oldmask);
}
if (!is_dir("full1/$uid/$c_id"))
{
 echo "<br>creating full1/$uid/$c_id";
 $oldmask = umask(0);
 mkdir("full1/$uid/$c_id",0777);
 umask($oldmask);
}
if (!is_dir("thumb/$uid/$c_id"))
{
 echo "<br>creating thumb/$uid/$c_id";
 $oldmask = umask(0);
 mkdir("thumb/$uid/$c_id",0777);
 umask($oldmask);
}

echo "<br>Done";
?>

I am able to make first two directories i.e 'full1/1' and 'thumb/1'. Script
do not allow me to make 'full1/1/1' and 'thumb/1/1' too. I also have tried
removing umask function.

Waiting for an answer. Thanks a ton for reading this far.

-- 
Kevin Javia

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to