Page 1 of 1

help

Posted: Fri Oct 17, 2003 7:40 am
by Alias
is there a way (in php or perl or some other language, php prefered) to chmod all the files and folders in your site at once??? i need them all at 777

Posted: Fri Oct 17, 2003 7:47 am
by Nay
Yeah, I guess so. Use opendir() to open up a directory, then list out all the files with readdir(), and use a loop to chmod each file with chmod().

I'm sure that would work,

-Nay

Posted: Fri Oct 17, 2003 7:55 am
by markl999
Also take a look at http://php.net/chmod , especially the user comments.

I'd also double check you need them all 777 as this is rarely the case as could have possible security implications ;)