List Info

Thread: note 78063 added to function.chmod




note 78063 added to function.chmod
user name
2007-09-26 09:48:05
Hello, I am having a slight problem. What I'm trying to do
is to have my site automaticly create a Directary, CHMOD it
to 0777 and then create 2 other folder's inside the original
one created and also CHMOD them to 0777 like the first. This
is the php code im using that seems to work.

mkdir($_SERVER['DOCUMENT_ROOT']."/test/1", 0755);
chmod($_SERVER['DOCUMENT_ROOT']."/test/1".$name,
intval(0777, 8));

That code works and creates the first folder I want to make,
but if i do it a secand time to create the folder inside
that one using the same code e.g.

mkdir($_SERVER['DOCUMENT_ROOT']."/test/1", 0755);
chmod($_SERVER['DOCUMENT_ROOT']."/test/1".$name,
intval(0777, 8));
mkdir($_SERVER['DOCUMENT_ROOT']."/test/1/2",
0755);
chmod($_SERVER['DOCUMENT_ROOT']."/test/1/2".$name,
intval(0777, 8));

I get this...

Warning: mkdir() [function.mkdir]: SAFE MODE Restriction in
effect. The script whose uid is 32313 is not allowed to
access /home/xxxx/public_html/test/1 owned by uid 99 in
/home/xxxx/public_html/test.php on line 11

Warning: chmod() [function.chmod]: Unable to access
/home/xxxx/public_html/test/1/2 in
/home/xxxx/public_html/test.php on line 12

Warning: chmod() [function.chmod]: No such file or directory
in /home/xxxx/public_html/test.php on line 12

Now I can't seem to work out why its not making the 2nd
folder with CHMOD 0777 because I beleave that if it works
once it should work again

Any suggestions?

Thanks
Clive
----
Server IP: 194.145.210.4
Probable Submitter: 212.139.111.234
----
Manual Page -- http:
//www.php.net/manual/en/function.chmod.php
Edit        -- https://master
.php.net/note/edit/78063
Del: integrated  -- h
ttps://master.php.net/note/delete/78063/integrated
Del: useless     -- http
s://master.php.net/note/delete/78063/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/78063/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/78063/spam
Del: non-english -- 
https://master.php.net/note/delete/78063/non-english
Del: in docs     -- http
s://master.php.net/note/delete/78063/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78063
Reject      -- https://mast
er.php.net/note/reject/78063
Search      -- https://
master.php.net/manage/user-notes.php

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


note 78063 rejected from function.chmod by nlopess
user name
2007-09-26 15:47:57
Note Submitter: clive at cliveread dot me dot uk 

----

Hello, I am having a slight problem. What I'm trying to do
is to have my site automaticly create a Directary, CHMOD it
to 0777 and then create 2 other folder's inside the original
one created and also CHMOD them to 0777 like the first. This
is the php code im using that seems to work.

mkdir($_SERVER['DOCUMENT_ROOT']."/test/1", 0755);
chmod($_SERVER['DOCUMENT_ROOT']."/test/1".$name,
intval(0777, 8));

That code works and creates the first folder I want to make,
but if i do it a secand time to create the folder inside
that one using the same code e.g.

mkdir($_SERVER['DOCUMENT_ROOT']."/test/1", 0755);
chmod($_SERVER['DOCUMENT_ROOT']."/test/1".$name,
intval(0777, 8));
mkdir($_SERVER['DOCUMENT_ROOT']."/test/1/2",
0755);
chmod($_SERVER['DOCUMENT_ROOT']."/test/1/2".$name,
intval(0777, 8));

I get this...

Warning: mkdir() [function.mkdir]: SAFE MODE Restriction in
effect. The script whose uid is 32313 is not allowed to
access /home/xxxx/public_html/test/1 owned by uid 99 in
/home/xxxx/public_html/test.php on line 11

Warning: chmod() [function.chmod]: Unable to access
/home/xxxx/public_html/test/1/2 in
/home/xxxx/public_html/test.php on line 12

Warning: chmod() [function.chmod]: No such file or directory
in /home/xxxx/public_html/test.php on line 12

Now I can't seem to work out why its not making the 2nd
folder with CHMOD 0777 because I beleave that if it works
once it should work again

Any suggestions?

Thanks
Clive

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


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )