PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Alias
Forum Newbie
Posts: 1 Joined: Fri Oct 17, 2003 7:40 am
Post
by Alias » Fri Oct 17, 2003 7:40 am
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
Nay
Forum Regular
Posts: 951 Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia
Post
by Nay » Fri Oct 17, 2003 7:47 am
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
markl999
DevNet Resident
Posts: 1972 Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)
Post
by markl999 » Fri Oct 17, 2003 7:55 am
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