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

peter pilsl pilsl@goldfisch.at
Tue, 30 May 2006 16:58:52 +0200


Andrew Ford wrote:
> I had a related problem.  Cache files are created readable only by the
> user the process is running as.  This is a consequence of the use of
> File::Temp to create the cache files, but it means that cache
> directories cannot be shared between different users, even if they are
> in the same group and set umask appropriately.  I was bitten by this
> when running the perl debugger on a web application that used Template
> Toolkit: I had created a new template and TT2 cached the compiled
> template, but the web application then could not read the cached file.
> I get round this now by specifying the cache directory as something like
> "/tmp/tt2-cache-$<".  This means that each user gets their own cache and
> avoids any interactions between processes using TT2 running as different
> users.
> 

thnx for your answer, but I dont see how its related to my problem.
I've only a single user using TT2 (httpd139) and the ownership is not a 
problem.  The problem in my case is that subdirectories (beneath 
compile_dir) have sometimes a permission that do not allow this user to 
create subdirectories (the user misses the x-right)

as you can see in this example:

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/


all entries are owned by the same user httpd139.  But the folder 
"literatur" strangely has drw-rw-rw instead of drwx------- like all the 
others.  So if I want to access "literatur/textarchiv" the subdirectory 
"textarchiv" cannot be created.

Thats the strange thing here.

I have several perl-handlers that use TT2, but all run as the same user 
: httpd139.  And I made sure that each handler uses a own compile_dir to 
avoid locking-problems.

thnx,
peter


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