Re: CHMOD...
| From: | Justin Patrin | Date: | Thu, 04 Dec 2003 16:25:55 +0000 |
| Subject: | Re: CHMOD... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-171849@lists.php.net to get a copy of this message | ||
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.