CiviCRM Asked by Christia on January 7, 2021
I have just upgraded from 4.3.8 to 4.7.15 on Drupal 7.50. Everything went well except the <drupal_root>sites/default/files/civicrm/templates_c
directory is rebuilt with the wrong file permissions. The owner should be fclub, not www-data, I think. For example, if I delete this directory in order to solve cached template loading problems and reload the page, it rebuilds itself.
drwxr-sr-x 3 www-data www-data 4096 Jan 11 14:24 templates_c
If I change the owner manually to the correct owner, as all other files and directories, there is an error message about not being able to write to temp files in templates_c.
This seems to be the residual affect of something that is causing multiple problems, including possibly outgoing mail, scheduled jobs and showing the menu.
Edit: Here is what it looks like after upgrading on an exact copy/dev site:
drwxrwsr-x 3 fclub www-data 4096 Jan 8 21:30 templates_c
Actually that looks good - your webserver user www-data needs to be able to write to files/ (and anything below it);
Correct answer by KarinG - Semper IT on January 7, 2021
If you getting the error: Uncaught PHP Exception Unable to write to the .../files/civicrm/templates_c" directory.
You have probably used drush cache clear run under your account and that created the temp files owned by the user running drush. SO you can "run drush as the web server user"
sudo -u apache drush cr
or you can just look at the location [/files/civicrm/templates_c] and after you find the "civicrm" folder at the top, just change ownership so web server can read & write that location (cached files).
Answered by salah-1 on January 7, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP