Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Updated: Comment #3
Problem/Motivation
If you installl via Drush, Drupal creates the files and the files/config_hash directories with permissions that doesn't allow the webserver to write them. Fun!
Proposed resolution
Go 0777, when installing via CLI. There are no changes when installing via Web or Simpletest non-interactive installer.
Remaining tasks
User interface changes
None.
API changes
None.
Related Issues
#1908440: Relax MTimeProtectedFileStorage permissions for DX, drush integration and world domination
Comment | File | Size | Author |
---|---|---|---|
#10 | drupal8.other_.2099467-10.patch | 7.88 KB | moshe weitzman |
#5 | 2099467_5.patch | 7.5 KB | chx |
#3 | drupal8.other_.2099467-3.patch | 7.18 KB | moshe weitzman |
#2 | clihappy.diff | 7.83 KB | moshe weitzman |
drush.patch | 3.13 KB | chx | |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedWe spoke with alexpott. The agreement is to rework the patch so that the mode is passed into install_drupal as a param. Then drush will pass 777 when it does the install. The web installer will not change.
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedPatch, as discussed at Drupalcon Friday sprint. I'm updating issue summary as well.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedSorry, one unintended change snuck in.
Comment #3.0
moshe weitzman CreditAttribution: moshe weitzman commentedUpdated issue summary.
Comment #5
chx CreditAttribution: chx commentedFixed a missing doxygen.
Comment #6
moshe weitzman CreditAttribution: moshe weitzman commentedThanks. Retitled for clarity.
Comment #7
moshe weitzman CreditAttribution: moshe weitzman commentedThanks. Better title.
Comment #8
moshe weitzman CreditAttribution: moshe weitzman commentedDrush and webserver can't both write to config dirs right now so escalating. After this, at least both can write after a drush install.
Comment #9
catchCan we do @param int $mode then say octal in the docs?
Comment #10
moshe weitzman CreditAttribution: moshe weitzman commentedRerolled with catch's Doxygen suggestion. No other changes.
Comment #11
catchComment #12
webchickJust a small question...
in general we are trying to remove global variables, not add them. Does $install_state need to be passed into these function? And/or is there an issue to move this to the Request object and pull it from there?
Comment #13
moshe weitzman CreditAttribution: moshe weitzman commentedhook_install(). does not pass $install_state nor does it have the ability to do so today. see https://api.drupal.org/api/drupal/core%21modules%21system%21system.api.p... and its caller https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extension...
So, addressing that would be a huge change. I don't know of efforts underway to improve this. Perhaps #1530756: [meta] Use a proper kernel for the installer would help. IMO, the installer should be a separate app, outside of Drupal (but bundled with it). Drupal should only focus on serving requests, not self-install.
Comment #14
webchickYeah, agreed with that.
I guess I was hoping we could replace those $GLOBALS calls with something like:
$mode = \Drupal::request()->get('install_state')->mode
...or something. But indeed, it sounds like this is #1530756: [meta] Use a proper kernel for the installer's job to clean up.
Committed and pushed to 8.x. Thanks!
Comment #15.0
(not verified) CreditAttribution: commentedUpdated issue summary.