I have just tried installing CiviCRM 5.30.1 using Drupal 7 under WIMP, i.e. Windows, IIS, MySQL and PHP 7.4, and was unable to do so, as I got a message telling me that \sites\default was not writable. On investigation, it seems that the PHP function is_writable will always return false under Windows. This means that it seems you can't install CiviCRM under Windows any more, as the IsCreatable function in \sites\all\modules\civicrm\setup\src\Setup\FileUtil.php relies on the is_writable function to test if the above folder is writable during the setup process. I got round it with the following code snippet.
public static function isCreateable($file) {
if (file_exists($file)) {
return is_writable($file);
}
$next = dirname($file);
do {
$current = $next;
// Under Windows, it seems that folder are never writable if (file_exists($current)) {
if( is_writable($current)) {
return true;
} else {
//Try to create a file
$result = fopen("Test.tmp", "w");
if ($result) {
// Close the file.
fclose($result);
// Delete it.
unlink("Test.tmp");
return true;
} else {
return false;
}
}
$next = dirname($current);
} while ($current && $next && $current != $next);
return FALSE;
}
No doubt some of you CiviCRM experts will have a comment.
attrib -r sites/default
.attrib -r sites\default
, with a backslash.