summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index d27896532..3c2663e74 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -572,7 +572,9 @@ sub create {
ABSOLUTE => 1,
RELATIVE => $ENV{MOD_PERL} ? 0 : 1,
- COMPILE_DIR => bz_locations()->{'template_cache'},
+ # Only use an on-disk template cache if we're running as the web
+ # server. This ensures the permissions of the cache remain correct.
+ COMPILE_DIR => is_webserver_group() ? bz_locations()->{'template_cache'} : undef,
# Don't check for a template update until 1 hour has passed since the
# last check.