Question
I have noticed a few pages both on our local TWiki and TWiki.org that have several changes made (not all in the same hour), yet are still stuck at an earlier revision - on doing an
rlog on the local TWiki, the file locking seems OK (locked by 'nobody', which is the Apache userid), but there's an Apache error_log message that correlates with a failed attempt to update the file:
[Thu Feb 21 13:42:40 2002] save: Can't create file /home/rdonkin/twiki/data/OTS/IPSecVPNs.txt
[Thu Feb 21 13:42:40 2002] save: print on closed filehandle TWiki::Store::FILE at TWiki/Store.pm line 648.
[Thu Feb 21 13:42:40 2002] save: Can't create file /home/rdonkin/twiki/data/OTS/IPSecVPNs.txt
[Thu Feb 21 13:42:40 2002] save: print on closed filehandle TWiki::Store::FILE at TWiki/Store.pm line 648.
[Thu Feb 21 14:57:00 2002] save: Can't create file /home/rdonkin/twiki/data/OTS/WirelessVendors.txt
[Thu Feb 21 14:57:00 2002] save: print on closed filehandle TWiki::Store::FILE at TWiki/Store.pm line 648.
[Thu Feb 21 14:57:00 2002] save: Can't create file /home/rdonkin/twiki/data/OTS/WirelessVendors.txt
[Thu Feb 21 14:57:00 2002] save: print on closed filehandle TWiki::Store::FILE at TWiki/Store.pm line 648.
The code in question looks like this (line 648 in bold):
sub saveFile
{
my( $name, $text ) = @_;
open( FILE, ">$name" ) or warn "Can't create file $name\n";
print FILE $text;
close( FILE);
}
This looks like a permissions or ownership problem with the .txt file, although the files in the web directory were set to 666 some time ago. The permissions on one of the files are now as follows (I did a chmod 666 on all files but unfortunately didn't record the settings when the problem occurred):
-rw-r--r-- 1 nobody nobody 4010 Feb 21 15:35 WirelessVendors.txt
-r--r--r-- 1 nobody nobody 8088 Feb 21 15:35 WirelessVendors.txt,v
This problem now seems to have fixed itself - the other day when I saw these errors, I tried editing this file several times, and the revision refused to move from r1.11, 26 Nov 2001, although the changes went into the .txt file - now, however it has worked OK... When the problem was happening, I was trying the edits several times within the 1 hour lock period, but removing the .lock file didn't help. Anyway, here's the latest rlog output:
RCS file: WirelessVendors.txt,v
Working file: WirelessVendors.txt
head: 1.12
branch:
locks: strict
nobody: 1.12
access list:
symbolic names:
keyword substitution: kv
total revisions: 12; selected revisions: 12
description:
none
----------------------------
revision 1.12 locked by: nobody;
date: 2002/02/22 10:07:28; author: RichardDonkin; state: Exp; lines: +1 -1
none
----------------------------
revision 1.11
date: 2001/11/26 09:43:03; author: RichardDonkin; state: Exp; lines: +4 -1
none
----------------------------
revision 1.10
date: 2001/10/25 13:23:41; author: RichardDonkin; state: Exp; lines: +1 -1
none
----------------------------
This may be related to
RcsWontKeepHistory, but I don't get any
RCS errors.
Our local TWiki is on the March 2001 beta, but this also seems to have happened on TWiki.org - see
SoapLite which is stuck at 1.1 although there have been 4 or more updates.
At the same time this was happening, I also got the bug that
SavePreviewTextOnServer was trying to fix (i.e. the Preview page had latest changes, as did the hidden text on that page, but the View page generated after hitting Save had the old contents of the page). This would be consistent with failing to update the .txt file for some reason.
Any ideas? I'm a bit stumped by this one...
- TWiki version: March 2001 beta
- Web server: Apache 1.3
- Server OS: Red Hat Linux 6.2
- Web browser: IE5.5
- Client OS: Win2000
--
RichardDonkin - 22 Feb 2002
Answer
.