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:


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

J. Cornelius J. Cornelius
Posts: 8

Did you try quoting the directory path?


- J

Mike Holloway Mike Holloway
Posts: 0

Try: (note the backticks, not apostrophes!)

`mkdir --mode=777 $dirpath`;


`mkdir -m 777 $dirpath`;

Scott Thompson Scott Thompson
Posts: 9

0777 is the default permission anyway. Make sure the script executing it has the correct permissions in the first place (i would imagine it does). Also, try FTPing to the folders and set the permissions then. If it fails, talk to your web host.

Kind regards,

If you enjoy programming, then checkout my coder profile

You must login to reply