Scripting: PHP trouble

started by Nicholas Castorina on Jul 31, 2007 — RSS Feed

Nicholas Castorina Nicholas Castorina
Posts: 1

I'm trying to make a directory with full permission rights using this script:

mkdir($dirpath,0777)


but for some reason it only gives permission 755. Can someone please help me?

J. Cornelius J. Cornelius
Posts: 7

Did you try quoting the directory path?

mkdir("/path/to/directory",0777);

Mike Holloway Mike Holloway
Posts: 0

Try: (note the backticks, not apostrophes!)

`mkdir --mode=777 $dirpath`;

or/

`mkdir -m 777 $dirpath`;

You must login to reply