When you would try to change the filepermission with a php script on your hosting, you would probably run into an "Operation not permitted" error.

This is because save mode is enabled. To bypass this limitation you could login unter ftp and change the file permission from there.

PHP:
  1. //settings
  2. $folders = array("/feeds/","/sitemap/");
  3. $ftp_details['ftp_user_name'] = "username";
  4. $ftp_details['ftp_user_pass'] = "pw";
  5. $ftp_details['ftp_root'] = '/defaultfolder/';
  6. $ftp_details['ftp_server'] = 'ftp.domain.com';
  7.  
  8. //function to login and change by FTP
  9. function chmod_custom($path, $mod, $ftp_details)
  10. {
  11. // extract ftp details (array keys as variable names)
  12. extract ($ftp_details);
  13.  
  14. // set up basic connection
  15. $conn_id = ftp_connect($ftp_server);
  16.  
  17. // login with username and password
  18. $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
  19.  
  20. // try to chmod $path directory
  21. if (ftp_site($conn_id, 'CHMOD '.$mod.' '.$ftp_root.$path) !== false) {
  22. $success=TRUE;
  23. }
  24. else {
  25. $success=FALSE;
  26. }
  27.  
  28. // close the connection
  29. ftp_close($conn_id);
  30. return $success;
  31. }
  32.  
  33. //the actual transaction
  34. foreach($folders as $folder){
  35. chmod_custom($folder, "0777", $ftp_details);
  36.  
  37. }

I found this solution on php.net.