In web hosts where server is not running in user account mode, Joomla creates files ( like cache files ) with the user permission or owner 99. This is a big problem if you want to perform operations like delete,change the permission on the files even if you are logged in with the right user, you will not able to do it.

Here is the solution, especially if you want to delete the files.

 

<?php
file_fix_directory(dirname(__FILE__));

function file_fix_directory($dir, $nomask = array('.', '..')) {
  if (is_dir($dir)) {
     // Try to make each directory world writable.
     if (@chmod($dir, 0777)) {
       echo "<p>Made writable: " . $dir . "</p>";
     }
  }
  if (is_dir($dir) && $handle = opendir($dir)) {
    while (false !== ($file = readdir($handle))) {
      if (!in_array($file, $nomask) && $file[0] != '.') {
        if (is_dir("$dir/$file")) {
          // Recurse into subdirectories
          file_fix_directory("$dir/$file", $nomask);
        }
        else {
          $filename = "$dir/$file";
            // Try to make each file world writable.
            if (@chmod($filename, 0666)) {
              echo "<p>Made writable: " . $filename . "</p>";
            }
        }
      }
    }
    closedir($handle);
  }
}
?>




Create a file with  content  as above , and put it in your root ( public_html folder) and access this file from your web browser. For example www.yourhost.com/myfile.php. Here myfile.php is the file created and kept in the root folder.

NOTE: Never leave this file in the file system, once done , delete this file. It is could be a security risk.