logo       

Re: permission-problems with cache : dir-mod wrong !: msg#00089

Subject: Re: permission-problems with cache : dir-mod wrong !
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.

Regards
Andrew

peter pilsl wrote:

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








--
Andrew Ford,  Director    Pauntley Prints / Ford & Mason Ltd
A.Ford-OfKrLxNBp1iX/4koqx8SDw@xxxxxxxxxxxxxxxx   South Wing Compton House
pauntley-prints.co.uk     Compton Green, Redmarley  Tel: +44 1531 829900
ford-mason.co.uk          Gloucester GL19 3JB       Fax: +44 1531 829901
refcards.com cronolog.org Great Britain          Mobile: +44 7785 258278


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe