Recursive chmod function
I want to change all directory/subdirectory folder attributes (within one folder) to 0777. Any PHP recursive functions that do this?
Thanks,
TM
I want to change all directory/subdirectory folder attributes (within one folder) to 0777. Any PHP recursive functions that do this?
Thanks,
TM
Mark Hensler posted this at 01:14 — 12th March 2004.
He has: 4,048 posts
Joined: Aug 2000
system("chmod 0777 ./*");
TonyMontana posted this at 02:37 — 12th March 2004.
They have: 218 posts
Joined: Apr 2001
That didn't work. I'm trying to transfer folders that had 0777 attributes from one server to another. The 0777 attributes are getting lost when I transfer them.
How can I retain the attributes or reset them?
Thanks,
TM
Suzanne posted this at 03:19 — 12th March 2004.
She has: 5,507 posts
Joined: Feb 2000
You can manually chmod the directories in most ftp applications. Worst case scenario.
TonyMontana posted this at 03:28 — 12th March 2004.
They have: 218 posts
Joined: Apr 2001
Too many folders to do it manually....
Chroder posted this at 04:27 — 12th March 2004.
He has: 91 posts
Joined: Mar 2004
FlashFXP has a recursive CHMOD feature. (Right click, CHMOD, "apply changes to all subfolders and files")
The New Tech - New
Webmaster-Talk.com
Chroder.com
Greg K posted this at 04:23 — 12th March 2004.
He has: 2,145 posts
Joined: Nov 2003
I think Mark's suggestion will work with the following change:
system("chmod -R 0777 ./*");
-Greg
TonyMontana posted this at 05:44 — 12th March 2004.
They have: 218 posts
Joined: Apr 2001
Thanks Chroder, that worked great.
TM
Mark Hensler posted this at 07:01 — 13th March 2004.
He has: 4,048 posts
Joined: Aug 2000
oops... ya.. forgot the -R
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.