[Templates] permission-problems with cache : dir-mod wrong !

peter pilsl pilsl@goldfisch.at
Tue, 30 May 2006 11:22:14 +0200


Since Saturday I suddenly face massive problems with my on-disk-cache.

-------
file error - cache failed to write index.tt2.ttc: Error in tempfile() 
using 
/tmp/tt2/data/apache/knowledge/sandbox/templates/literatur/wienermoderne/XXXXXXXXXX: 
Could not create temp file 
/tmp/tt2/data/apache/knowledge/sandbox/templates/literatur/wienermoderne/D0wMRP4DtC: 
Permission denied at 
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/Template/Document.pm 
line 280 path : literatur/wienermoderne/index.tt2
-------

compile_dir is '/tmp/tt2'

the funny thing is that, when I completely empty the cache-dir, 
everything is working fine and suddenly on a random (to me) subfolder 
the above error occures. When I look at the cache-dir into the 
problematic folder I can see that there are different permissions set:

# ls -l /tmp/tt2/data/apache/knowledge/sandbox/templates
total 11
drwx------    2 httpd139 httpd         224 May 30 10:52 historiografie/
-rw-------    1 httpd139 httpd        5755 Feb  7 09:34 index.tt2.ttc
drw-rw-rw-    2 httpd139 httpd          48 May 30 11:00 literatur/
drwx------    3 httpd139 httpd         416 May 30 10:59 medienpreise/
drwx------    2 httpd139 httpd         424 May 30 10:59 navigation/
drwx------    2 httpd139 httpd         312 May 30 10:47 startseite/

for some wicked reason the folder literatur has a complete different mod 
set. It lacks the X-permission and so the toolkit cannon create 
subfolders.  When I perform a chmod -R 700 * on the whole cache 
everything is working fine for a while again.  (and I dont want to chmod 
700 the compiled files themselves :)

I dont have any clue what causes this problem. And I didnt find any 
config-option that allows me to fix the creation-mode.

Any idea?
thnx,
peter

ps: using Template-Toolkit 2.08







-- 
mag. peter pilsl
goldfisch.at
IT- & dataconsulting
tel: +43 650 3574035
tel: +43 1 8900602
fax: +43 1 8900602 15
pilsl@goldfisch.at