RE: [PHP] CHMOD...
| From: | Jay Blanchard | Date: | Thu, 04 Dec 2003 13:48:25 +0000 |
| Subject: | RE: [PHP] CHMOD... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-171819@lists.php.net to get a copy of this message | ||
[snip]
Is there anyway to use CHMOD:
chmod ("/somedir/somefile", 0755);
but have it set all files, folders etc to the CHMOD setting I want?
I have a folder, and within that, I wanna quickly, jsut set it all to
CHMOD 777.
all sub DIR's and files etc...
can it be done simply?
E.G. :
chmod ("/somedir/%", 0755);
[/snip]
Danger, Danger!! [tm]
Yes you can, but 'tis not a swell idea. You can exec the chmod command
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.