function SitesDirectoryHardeningTest::makeWritable
Same name in other branches
- 9 core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php \Drupal\Tests\system\Functional\System\SitesDirectoryHardeningTest::makeWritable()
- 8.9.x core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php \Drupal\Tests\system\Functional\System\SitesDirectoryHardeningTest::makeWritable()
- 11.x core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php \Drupal\Tests\system\Functional\System\SitesDirectoryHardeningTest::makeWritable()
Makes the given path and settings file writable.
Parameters
string $site_path: The sites directory path, such as 'sites/default'.
2 calls to SitesDirectoryHardeningTest::makeWritable()
- SitesDirectoryHardeningTest::testSitesDirectoryHardening in core/
modules/ system/ tests/ src/ Functional/ System/ SitesDirectoryHardeningTest.php - Tests the default behavior to restrict directory permissions is enforced.
- SitesDirectoryHardeningTest::testSitesDirectoryHardeningConfig in core/
modules/ system/ tests/ src/ Functional/ System/ SitesDirectoryHardeningTest.php - Tests writable files remain writable when directory hardening is disabled.
File
-
core/
modules/ system/ tests/ src/ Functional/ System/ SitesDirectoryHardeningTest.php, line 104
Class
- SitesDirectoryHardeningTest
- Tests Drupal permissions hardening of /sites subdirectories.
Namespace
Drupal\Tests\system\Functional\SystemCode
protected function makeWritable($site_path) {
chmod($site_path, 0755);
chmod($this->settingsFile($site_path), 0644);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.