In all fairness, that's not a very good solution. Using system commands makes your script not cross platform, meaning it can't work on Windows. For a better solution try writing a recursive chmod script that sets the permission, the loops through the files and calls itself on them if the input is a directory.

Jay Blanchard wrote:
[snip]

exec("chmod 0777 /directory/*");

You still cannot set all sub directory and files within those
permissions. Best to loop through and set each as needed, don't forget
to cahnge them back.



Yes, you can:

exec("chmod -R 0777 /directory/*");
[snip]

*slaps forehead* Duh me! Of course! I so rarely (nearly never) use that
switch that in my haste to fire off an answer I forgot it.

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



Reply via email to