Skip to content

settings.php permissions #68

@loopy3025

Description

@loopy3025

Describe the bug
On composer install, drupal-recommended-settings runs /home/ide/project/vendor/bin/drush drs:init:settings. When it does this, permissions on settings.php change from 644 to 755.

To Reproduce

chmod 644 docroot/sites/default/settings.php
rm -rf vendor
git checkout composer.lock
composer install

Expected behavior
Permissions on settings.php should be 644 on a drupal website.

Environment
Happening both locally and during pipelines ci, so ci fails on a check dirty.

Additional context
I have tried adding the file to file-mapping in composer, but that also doesn't work. The chmod still happens.

"extra": {
        "drupal-scaffold": {
            "locations": {
                "web-root": "./docroot"
            },
            "file-mapping": {
                "[web-root]/sites/default/settings.php": false
            }
        },
}

Although I really don't want to do this anyways because it wouldn't capture future patches to settings.php.

For now I will add a hook that re-chmods the file but this is weird.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions