CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Civicrm changing permissions in templates_c directory
Pages: [1]

Author Topic: Civicrm changing permissions in templates_c directory  (Read 3482 times)

cbh

  • I post occasionally
  • **
  • Posts: 71
  • Karma: 0
  • CiviCRM version: 4.1.3
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.71-log
  • PHP version: 5.5.3
Civicrm changing permissions in templates_c directory
June 16, 2009, 10:28:30 am
I've run into a problem that recurs when I install a civicrm update - including the most recent one. After uploading the update to my sites/all directory in Drupal and running civicrm, it appears that the permissions for the templates_c/en_US/en_US directory are reset - I believe to 755, and result in error messages. Resetting them to 777 resolves the issue.

I've contacted my ISP about this as well. It's easy enough to fix now that I know to look for this, but I'm wondering why it would happen in the first place, i.e. is it something I'm doing, a problem with my host setup, or something off with civicrm?

Cheers, and thanks

Chris

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Civicrm changing permissions in templates_c directory
June 16, 2009, 11:01:41 pm
Chris:

AFAIK CiviCRM does not change any permissions for template_c

Kurund
Found this reply helpful? Support CiviCRM

cbh

  • I post occasionally
  • **
  • Posts: 71
  • Karma: 0
  • CiviCRM version: 4.1.3
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.71-log
  • PHP version: 5.5.3
Re: Civicrm changing permissions in templates_c directory
June 17, 2009, 04:00:45 pm
OK, thanks.

My ISP was interested in hearing your reply, and I guess now, I'll be interested in hearing theirs!

Cheers
Chris

cbh

  • I post occasionally
  • **
  • Posts: 71
  • Karma: 0
  • CiviCRM version: 4.1.3
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.71-log
  • PHP version: 5.5.3
Re: Civicrm changing permissions in templates_c directory
June 23, 2009, 07:41:06 am
My isp can't think of anything that would cause it - here is the specific message I'm now getting when I bring up the main screen for CiviContribute:

   •   user warning: Smarty error: problem creating directory '/hsphere/local/home/wwwideaworld/drupal.ideaworldhq.com/sites/default/files/civicrm/templates_c/en_US/en_US/%%3D/3D4' in /hsphere/local/home/wwwideaworld/drupal.ideaworldhq.com/sites/all/modules/civicrm/packages/Smarty/Smarty.class.php on line 1094.
   •   warning: Smarty::include(/hsphere/local/home/myuserid/mydomain/sites/default/files/civicrm/templates_c/en_US/en_US//%%3D/3D4/3D44E36C%%Selector.tpl.php): failed to open stream: No such file or directory in /hsphere/local/home/myuserid/mydomain/sites/all/modules/civicrm/packages/Smarty/Smarty.class.php on line 1870.
   •   warning: Smarty::include(): Failed opening '/hsphere/local/home/myuserid/mydomain/sites/default/files/civicrm/templates_c/en_US/en_US//%%3D/3D4/3D44E36C%%Selector.tpl.php' for inclusion (include_path='.:/hsphere/local/home/myuserid/mydomain/sites/all/modules/civicrm:/hsphere/local/home/myuserid/mydomain/sites/all/modules/civicrm/packages:.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/myuserid/mydomain/sites/all/modules/civicrm/packages/Smarty/Smarty.class.php on line 1870.

Permissions in the templates_c/en_US/en_US directory are changing to 755, with ownership showing as either 'httpd' or '100'

Once I change the permissions back to 777 (for contents as well as directories it seems) everything works - until the next time it happens. This time it wasn't attributable to a civicrm update, so I'm wondering if it's happening when civicrm creates a new directory/file within the affected directory. I know beans about this, so any help would be appreciated. I can define what permission level is assigned to new directories through the settings for my sites, but I'd prefer not to set it to 777 if there's another way to deal with this.

Cheers, and thanks
Chris Hutcheson


CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Civicrm changing permissions in templates_c directory
June 26, 2009, 04:12:07 pm
I don't beleive CiviCRM is capable of changing permissions.  Many hosts do regular scans for directories marked as 777 and change them to 755 for security purposes.   They claim they don't do this, but I'm not sure they know what they are talking about.   What you need to do is instead explore what user apache is running as and look to 'chown' the directory as such, so apache can always write to it?

Hope this helps, just a thought.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

andrewg

  • Guest
Re: Civicrm changing permissions in templates_c directory
February 01, 2010, 05:53:16 pm
hi,

I am having the same issues on one of my client's sites.

This is what I get when I try to import or export contacts in CiviCRM:

Warning: Smarty error: problem creating directory '/home/motutapu/public_html/media/civicrm/templates_c/en_US/en_GB/%%00/00A' in /home/motutapu/public_html/administrator/components/com_civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1094

Warning: include(/home/motutapu/public_html/media/civicrm/templates_c/en_US/en_GB//%%00/00A/00AEAD8F%%Select.tpl.php) [function.include]: failed to open stream: No such file or directory in /home/motutapu/public_html/administrator/components/com_civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1870

Warning: include() [function.include]: Failed opening '/home/motutapu/public_html/media/civicrm/templates_c/en_US/en_GB//%%00/00A/00AEAD8F%%Select.tpl.php' for inclusion (include_path='.:/home/motutapu/public_html/administrator/components/com_civicrm/civicrm:/home/motutapu/public_html/administrator/components/com_civicrm/civicrm/packages:.:/usr/lib/php:/usr/local/lib/php') in /home/motutapu/public_html/administrator/components/com_civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1870

Does anyone have a fix for this?

Cheers,


Andrew

andrewg

  • Guest
Re: Civicrm changing permissions in templates_c directory
February 04, 2010, 03:07:54 pm
CiviCRM cannot create the smarty templates because the client's web account had hit its disk quota.

Once we increased the quota, all worked perfectly.

Hope this helps some users in the future.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Civicrm changing permissions in templates_c directory

This forum was archived on 2017-11-26.