You can reset file permissions via PHP. the code below is an example on resetting file permission recursively. You must have shell_exec enabled.
- Create a blank php file
- Add the following code to it
<?php echo shell_exec( 'find . -type f -print0 | xargs -0 chmod 644' ); echo shell_exec( 'find . -type d -print0 | xargs -0 chmod 755' ); ?>
- Place the file in the root directory you want it to work from
- go to your webbrowser and execute the file