cachesimple: cache file ownership

Creating and modifying plugins.
Post Reply
bconnolly

cachesimple: cache file ownership

Post 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
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
bconnolly

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply