Problem/Motivation
we have a system user, aegir
the user is part of the www-data group
but the user cannot create directories
thus we get a WSOD
filecache creates directories and writes files as www-data:www-data
My sites are owned by a user, aegir.
Drush commands are also done under aegir.
After enabling filecache, drush no longer works. Why?
Drush attempts to write to cache as the aegir user and is denied
Is there a way for aegir user to create files in a directory owned by www-data and write it as www-data. The aegir user is part of www-data group.
It can't be a manual process because the owners will change and possibly take down the site
This is a different issue but they had a fix - https://www.drupal.org/project/google_tag/issues/3159778#comment-14047515
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3207384-user-cannot-create-cache-directory-or-files.patch | 579 bytes | socialnicheguru |
Comments
Comment #2
socialnicheguru commentedsomething like this is happening: https://www.drupal.org/project/google_tag/issues/3159778#comment-14047515
Comment #3
socialnicheguru commentedComment #4
socialnicheguru commentedComment #5
socialnicheguru commentedChanged permission to allow group to write to file also
Comment #6
socialnicheguru commentedComment #7
pfrenssenI see that both users are a member of the
www-datagroup. You can solve it by setting this group as the owner of the cache folder, and assign the "setgid" bit so that all newly created files will inherit the group from the parent.Something like this (not tested):
Comment #8
pfrenssenActually I think the suggested patch makes sense in a lot of situations. It is a common scenario that a group is created for the webserver and that other services join this group.
Comment #10
pfrenssenThanks!