Datnigz2002 Posted May 1, 2008 Share Posted May 1, 2008 I just need a very simple line of code that tells me how to CHMOD -R a directory. Thanks Link to comment https://forums.phpfreaks.com/topic/103778-how-to-recursively-chmod-a-directory-php/ Share on other sites More sharing options...
JD* Posted May 1, 2008 Share Posted May 1, 2008 exec("Chmod -R /directory"); Link to comment https://forums.phpfreaks.com/topic/103778-how-to-recursively-chmod-a-directory-php/#findComment-531303 Share on other sites More sharing options...
Datnigz2002 Posted May 1, 2008 Author Share Posted May 1, 2008 New to this.. Can you give me an example? where do I put the permission numbers? Is it like this? <?php exec("Chmod -R ../uploads", "0777"); ?> Link to comment https://forums.phpfreaks.com/topic/103778-how-to-recursively-chmod-a-directory-php/#findComment-531309 Share on other sites More sharing options...
DarkWater Posted May 1, 2008 Share Posted May 1, 2008 Okay, you haven't used UNIX before then... exec("chmod -r 0755 directory/goes/here"); >_> You need permissions though. Link to comment https://forums.phpfreaks.com/topic/103778-how-to-recursively-chmod-a-directory-php/#findComment-531313 Share on other sites More sharing options...
JD* Posted May 1, 2008 Share Posted May 1, 2008 Sorry, didn't realize there was a PHP integration for this. Check out http://us2.php.net/chmod Link to comment https://forums.phpfreaks.com/topic/103778-how-to-recursively-chmod-a-directory-php/#findComment-531314 Share on other sites More sharing options...
Datnigz2002 Posted May 1, 2008 Author Share Posted May 1, 2008 Nope can't say I have but thanks I will try that. (: Link to comment https://forums.phpfreaks.com/topic/103778-how-to-recursively-chmod-a-directory-php/#findComment-531317 Share on other sites More sharing options...
DarkWater Posted May 1, 2008 Share Posted May 1, 2008 Sorry, didn't realize there was a PHP integration for this. Check out http://us2.php.net/chmod I think he has an older version of PHP and the recursive option wasn't added in his. Link to comment https://forums.phpfreaks.com/topic/103778-how-to-recursively-chmod-a-directory-php/#findComment-531322 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.