Problem/Motivation
Try this out (adding the requisite --base-url
and --db-url
options as suits your environment):
php core/scripts/test-site.php install --install-profile=standard
You'll get this:
PHP Warning: file_put_contents(/var/www/html/web/sites/simpletest/71348820/.htkey): Failed to open stream: Permission denied in /var/www/html/web/core/includes/bootstrap.inc on line 303
I traced this to Announcements Feed, specifically its cron hook, which innocently tries to do an HTTP request to the mothership to fetch announcements. In the course of this, drupal_generate_test_ua() is called, which tries to write the test site's .htkey file, but fails because apparently the test site directory is not writable at that moment.
What's going on here? I can't figure out why the test site directory isn't writable at this point; it should be.