Re: [SMARTY] cache cron job
| From: | messju mohr | Date: | Wed, 19 Feb 2003 08:19:32 +0000 |
| Subject: | Re: [SMARTY] cache cron job | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7857@lists.php.net to get a copy of this message | ||
On Wed, Feb 19, 2003 at 01:32:58AM -0500, Paul Lockaby wrote:
> I searched through the old mailing list to find information on running a
> cron job to periodically and transparently clear the cache and compiled
> templates. I found what I was looking for in this article:
>
>
> http://marc.theaimsgroup.com/?l=smarty-general&m=104093908820181&w=2
>
> But, if I don't have root access on my box, the cache files are written
> as nobody:nobody, and the only user I have access to is paul:paul, how
> do I clear the cache without having to call a PHP script? Not possible,
> I would imagine, but I have to wonder how the rest of you do it.
make the templates_c directory group-sticky and own it to group paul.
then all files created in that directory will not be group-owned by
the primary group of the process (nobody), but by the group of the
directory (paul)
chown nobody.paul templates_c # you may need your admin for that
chmod 771 templates_c
chmod g+s templates_c
and set
$smarty->_file_perms = 0664
$smarty->_dir_perms = 02771 // the 2 is sticky group
then the files are owned by nobody, but paul has (due to
group-permissions) permission to remove them.
HTH
messju
> ~Paul
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
Minister: Ein Minister ist ein Staatsdiener mit eintägiger Kündigungsfrist.
Georg Leber