Page 1 of 1
cachesimple: cache file ownership
Posted: Mon Jan 16, 2006 11:24 pm
by bconnolly
I am testing out cachesimple.
As I test it, I'll be cleaing out cache files and starting over now and again. That said, Cache Lite cache files are owned by "nobody." Can I change that to user?
Brian
Posted: Tue Jan 17, 2006 12:25 am
by judebert
I don't think you want to.
The webserver needs to be able to write those files, since it's the one running serendipity. If you change them to some user, s9y won't be able to overwrite them with new data.
Same problem for changing the directory owner or permissions.
Changing it in Serendipity is even more troublesome: we'd need permission to change the owner of files, and there are very few webservers that allow that, due to security concerns.
What are you trying to accomplish that can't be done with cache files owned by 'nobody'? You ought to be able to delete them.
Posted: Tue Jan 17, 2006 12:51 am
by bconnolly
I use a hosting company and I do not have root acccess.
As the plugin is still experimental, I want to be able to install and remove it. It does not remove.
How about this. Can we get the cachesimple to delete the cache files when uninstalled through Serendipity? That would work.
Brian
Posted: Tue Jan 17, 2006 9:51 am
by garvinhicking
You could also write a small PHP script that cleans the files for you:
Code: Select all
<?php
$x = opendir('./templates_c');
while (($file = readdir($x)) !== FALSE) {
echo 'Unlinking ' . $file;
// unlink('./templates_c/' . $file);
}
First run that code and see what it would unlink. Then uncomment the // unlink functionality.
I've also committed a new version of the cache plugin that does the uninstall thing you mentioned. Good Idea!
Regards,
Garvin