This code changes directory permissions
Mark E.
<?php
echo shell_exec('
#!/bin/bash
find $1 -type d -exec chmod -R 755 {} \;
echo " end"
');
?>