D8 Install checks run via Drupal Status Report - give misleading warnings.
If the civicrm.settings.php file is not writable, a warning is showing on Drupal Status Report indicating that the civicrm.settings.php file should be writable by the webserver user. This also shows on the command line when running some drush commands.
Ideal solution: The reverse behaviour should be present. Ideally we should warn if civicrm.settings.php is writable by the web server user.
The drupal hook requirements is what is generating this error message.
There is an argument passed to this hook
$phase that would allow us to target this behaviour.
Currently the behaviour is to use \Civi\Setup checkRequirements() which runs Civicrm Core's install requirements checks. There is possibly some use in some of these requirements being checked and warnings displayed on the Drupal Status Report page - however there is currently no easy way to differentiate between checks that should only run at install time like the writability of civicrm.settings.php and those that make sense to run post install as well.
Currently the check to see if the user is authorised to run the install only runs when phase is set to install.
An initial solution is potentially to only run the check requirements on install. Then if additional metadata can be returned by
$setup->checkRequirements()->getMessages() as to whether the warning should run on install or runtime, or checks performed inside civicrm core requirements checks to test for if civi is installed the change could be reverted.