Issue
I think my question explains everything. I want to use php's chmod() function to set a 777 permission on a folder, its subfolders and files.
Any Help is appreciated. THX.
Solution
chmod("Folder",0770);
function in php allow you to change permission of file and for recursive change use exec
exec ("find /path/to/folder -type d -exec chmod 0770 {} +");//for sub directory
exec ("find /path/to/folder -type f -exec chmod 0644 {} +");//for files inside directory
make sure that your webserver have write access to the Folder.
Check these for more detail
http://php.net/manual/en/function.chmod.php
http://www.w3schools.com/php/func_filesystem_chmod.asp
Answered By - anand