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.
I see the following types of errors when verifying a CiviCRM site:
Failed calling chmod() on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/templates_c/en_US/%%0C/0CB/0CBEC124%%default.tpl.php.
-
Failed calling chmod() on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/templates_c/en_US/%%0C/0CB.
-
Failed calling chmod() on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/templates_c/en_US/%%0C.
... and:
Failed calling chmod() on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/templates_c.
-
Changed permissions of /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/templates_c to 2770
-
chgrp(): Operation not permitted FileSystem.php:451
-
Failed calling chgrp() on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/templates_c/en_US/%%CC/CCD/CCDBFFBE%%openFlashChart.tpl.php.
-
chgrp(): Operation not permitted FileSystem.php:451
-
Failed calling chgrp() on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/templates_c/en_US/%%CC/CCD.
-
chgrp(): Operation not permitted FileSystem.php:451
-
Failed calling chgrp() on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/templates_c/en_US/%%CC.
... and:
Failed calling chgrp() on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/templates_c.
-
Changed group ownership /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/templates_c to www-data
-
Failed calling chmod() on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/upload.
-
fileperms(): stat failed for /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/upload FileSystem.php:148
-
Could not change permissions /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/upload to 2770 (chmod to 2770 failed on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/upload)
-
chgrp(): No such file or directory FileSystem.php:451
-
Failed calling chgrp() on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/upload.
-
filegroup(): stat failed for /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/upload FileSystem.php:227
-
Could not change group ownership of /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/upload to www-data (chgrp to www-data failed on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/upload)
-
Failed calling chmod() on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/persist.
-
fileperms(): stat failed for /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/persist FileSystem.php:148
-
Could not change permissions /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/persist to 2770 (chmod to 2770 failed on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/persist)
-
chgrp(): No such file or directory FileSystem.php:451
-
Failed calling chgrp() on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/persist.
-
filegroup(): stat failed for /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/persist FileSystem.php:227
-
Could not change group ownership of /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/persist to www-data (chgrp to www-data failed on /var/aegir/platforms/demtools-civicrm-20160726/sites/uacase-74.demcloud.org/files/civicrm/persist)
Comment | File | Size | Author |
---|---|---|---|
#5 | 2791953-5.patch | 382 bytes | ergonlogic |
#4 | 2791953-4.patch | 4.73 KB | ergonlogic |
Comments
Comment #2
ergonlogicI've posted this as a META issue, since this has been a long-standing issue that may have multiple factors causing it. If we can tease those apart, perhaps we can spawn more specific issue to address them.
Comment #3
ergonlogicWith the new file permission and ownership fixes to come out of #2616426: Add 'fix permissions' task,
_provision_civicrm_fixpermissions()
becomes pretty much redundant. Of course, that'd make those feature dependencies of hosting_civicrm...There remains the code at the end of that function, to delete
Config.IDS.ini
files from various locations. Since that's essentially all that's left, I'd suggest renaming that function to something like_provision_civicrm_clear_config_cache()
A number of the warnings listed in the original bug report were due to attempts in
_provision_civicrm_fixpermissions()
to chgrp or chmod directories that don't exist.Patch forthcoming.
Comment #4
ergonlogicHere's a patch to clean up the permissions fix stuff.
Comment #5
ergonlogic... and here's a patch to depend on the new features. I'm not certain this is really required, as such.
Comment #6
gboudrias CreditAttribution: gboudrias at Praxis Labs Coop commentedPatch #4 works afaict. At least the patch applies and the warnings are no longer appearing.
For anyone else wanting to test this patch: You need to run install.sh in both fix_permissions and fix_ownership as root after enabling the respective modules.
Edit: I meant Patch #4, not 5.
Comment #7
ShaneOnABike CreditAttribution: ShaneOnABike at Bees on a Bike commentedI would be happy to test this but honestly I don't understand what you mean by running install.sh? I'm presently running into this issue
Comment #8
gboudrias CreditAttribution: gboudrias commentedIt's been a while since I tested this, but the fix_permissions and fix_ownership modules need to be "installed" by a root user, since you need to give the Aegir user the access to change file permissions (which normally requires root itself).
The install scripts are in fix_ownership/scripts and fix_ownership/scripts respectively, which are both part of hosting_tasks_extra (which comes with Aegir and is in the hostmaster profile).
Comment #9
ShaneOnABike CreditAttribution: ShaneOnABike at Bees on a Bike commentedYahoo! This works a charm can we roll it into the module?
Comment #11
helmo CreditAttribution: helmo at Initfour websolutions for Aegir Cooperative commentedcommitted, thanks.
Comment #13
bgm CreditAttribution: bgm at Coop SymbioTIC commentedHeads up: this caused an important regression that can cause obscure bugs: https://www.drupal.org/project/hosting_civicrm/issues/2972031
Comment #14
joegl CreditAttribution: joegl commentedI am not sure which issue to comment on because this seems to be common problem. When we verify a site with CiviCRM the files/civicrm/templates_c directory has its permissions, owner, and group changed from whatever it was set to. This is not limited to that one directory, but that's the one that causes the entire website to bomb/WSOD.
This is on Drupal 7.57, CiviCRM 5.9.1, and Hosting CiviCRM 7.3.170.
Comment #15
bgm CreditAttribution: bgm at Coop SymbioTIC commentedHi @joegl, that sounds like #2972031: Regression: template_c must be setguid, which is still open (I posted a workaround there, but we should really implement a better fix).