data/versioncache and Scmbug

David Miller justdave at bugzilla.org
Wed Aug 11 04:25:10 UTC 2004


Kristis Makris wrote:

> Well, there's a perfectly logical explanation for everything.
> 
> On Tue, 2004-07-27 at 14:24, Christian Robottom Reis wrote:
> 
>>I'm finding it hard to understand why your versioncache would not be
>>generated upon running a CGI, but you might be able to identify this
>>quicker than me given it's actually missing from your disk <wink>.
> 
> It turns out that if one calls GenerateVersionTable() as the root user
> (e.g. when running the Scmbug daemon), the permissions on
> data/versioncache are:
> 
> # ls -lrtah data/versioncache 
> -rw-rw----    1 apache   apache        16K Aug 10 01:05
> data/versioncache
> 
> Which forbid the root user to delete the versioncache file.
> 
> suddenly unlink("data/versioncache") sounds a lot more attractive than
> calling GenerateVersionTable(). Hmm...

Actually, that should be the other way around.  When you run it as root, 
it changes the permissions to be root, and then the apache user can no 
longer rename over top of it the next time it needs to be rebuilt, which 
causes Bugzilla to die.  I could swear we fixed that at some point 
though, so that if it can't write to the file, it assumes it's not there 
and deletes and rebuilds it (which it can do because of the directory 
permissions, since apache has write access to the directory).

-- 
Dave Miller      Project Leader, Bugzilla Bug Tracking System
http://www.justdave.net/             http://www.bugzilla.org/



More information about the developers mailing list