I wrote an archiver that, against all odds, seems to work. Only now do I realize the problem I have running this on Cornerhost: there's no suexec, so when the 404 handler that is supposed to write the files to disk runs, well... it's running as the web user, who doesn't have write permission to my directory tree.
So I think I need to look at doing a dearchiver script like the archiver one: a script that runs from cron, so it runs as me, that takes a list of files the 404 handler has said were recently used and writes them out to disk, with my ownership and write permissions.
Guess the spec needs updating.
Comments
comment
Ah. Vellum, my blogging system, does funky caching, and the web user does have write access to the tree. Is there any reason that the web user can’t write to the tree other than “Cornerhost don’t allow it”? I’m worried that you did it deliberately for a good reason that I haven’t thought of :-)
comment
It’s not that I can’t allow the web user to write to the tree, but that I have to set every directory gw+w to do it. I’d rather not do that, since I’m not the only user on the machine.
Of course, I already have a few directories set like that (like the MT directories). That was the thought I had when I was setting the permissions for a lot of directories I had partially archived; if it was just the extra work that gave me a bad feeling about it, having the archiver set each directory it archives gw+w itself might help.
Being able to write files is worse with lazy caching, because I’m actually linking to files that aren’t there. Someone could write a file in place of an archived file and have it served as if I wrote it (and, as designed, that would even overwrite the archived version of the file when it got old enough; that’s fixable though).
But no, I wouldn’t say I have a good reason not to do it.