for shell-exec disabled sites ( for security reasons, e.g. ) :
suggest changing the shell call `chmod -R 777 .... ' to the function call chmod("file-name", 0777);
Might need another for loop to process each file in the directory ( instead of the -R ).
<?php
chmod("foldername", chmod_mode);
?>
already exists in various places within coppermine, what exactly are you suggesting?
Joachim