Re: [SMARTY] cache cron job
| From: | Paul Lockaby | Date: | Wed, 19 Feb 2003 14:29:05 +0000 |
| Subject: | Re: [SMARTY] cache cron job | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7876@lists.php.net to get a copy of this message | ||
messju mohr wrote:
On Wed, Feb 19, 2003 at 01:32:58AM -0500, Paul Lockaby wrote:Hi, Thank you for the suggestion. I tried it out on a test machine and needed root access to execute all of the commands, and then when I was done, I still couldn't do anything with the files as user paul. Anyone have any different suggestions? Seriously, how do you people run scripts to clear out the cache/compile directories? ~Paul -- Paul Lockaby paul@paullockaby.com http://www.paullockaby.comI 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