Tags:
create new tag
view all tags

Question

I've been running the December 2001 release of TWiki for some months now on an intranet. All has been good. Then, recently (I'd say in the last 2 days), I've been seeing this troubling issue.

What it looks like to the user:

  1. Edit an existing page.
  2. Preview your results. Everything looks ok. Your changes are there.
  3. Check the "release edit lock" box.
  4. Click the "Save Changes" button.
  5. The page "loses" your changes. They're not there. If I use my browser's "back" button, my changes are there on the preview page.

What it looks like to the error log:

[Wed Jun 26 12:36:03 2002] view: print on closed filehandle TWiki::Store::FILE at ../lib/TWiki/Store.pm line 1152.
[Wed Jun 26 12:36:09 2002] edit: print on closed filehandle TWiki::Store::FILE at ../lib/TWiki/Store.pm line 1152.
[Wed Jun 26 12:36:50 2002] save: Can't create file /var/www/internal.secureworks.net/twiki/data/Test/TestTopic1.txt
[Wed Jun 26 12:36:50 2002] save: print on closed filehandle TWiki::Store::FILE at ../lib/TWiki/Store.pm line 1163.
[Wed Jun 26 12:36:50 2002] save: print on closed filehandle TWiki::Store::FILE at ../lib/TWiki/Store.pm line 1152.
[Wed Jun 26 12:36:51 2002] view: print on closed filehandle TWiki::Store::FILE at ../lib/TWiki/Store.pm line 1152
As a test, I tried reproducing this. I went into the test web, started a new page, looked at the preview, and saved the page. The bug didn't happen. The error log showed lots of "print on closed filehandle" errors, but not the "Can't create file" error, seen above. Then, I thought, "What if this bug only shows up when you're editing an existing page?" So, I clicked edit at the bottom of the page I had just created. Edit, preview, save. No bug.

Finally, I thought, "What if this bug shows up only on existing files with more than an hour past since they were first created (so I'm working on rev. >1.1)?" I tried that. Whammo! The bug reproduces. The problem is that this problem didn't always exist. I've been running TWiki on our intranet for months now. The only change I know of is that we upgraded Apache for that recent vulnerability. Oh yeah -- one other thing that seems to "help". If I re-edit a page by backing up when I notice my edits are "lost" and the system takes them.

Could this be a problem between the new Apache and Main.TWiki?

  • TWiki version: 20011201 (December 2001)
  • Web server: Apache 1.3.9
  • Server OS: FreeBSD
  • Web browser: Mozilla 1.0
  • Client OS: Linux 2.4 (RedHat 7.1)

-- MeganGolding - 26 Jun 2002

Answer

Could be a file permission problem. Not sure if this is the case, but worth while checking: Run the testenv script to see who the cgi user is and compare that to the existing files.

-- PeterThoeny - 27 Jun 2002

See also TopicNotSaved and ViewAfterSaveLosesText and ViewAfterSaveCachesOldPage - first two sound similar to your problem. I doubt that it is Apache related, but you never know... Very interesting that you can reproduce it and have the error log message.

-- RichardDonkin - 27 Jun 2002

Arrrggghhh! In the end, this problem was rooted in file permissions and ownersip. Somehow (we're installed on a very accessible server), the files had r--r--r-- (444) permissions. No wonder i was getting all those errors! The CGI couldn't write to the files. After chmod'ing the files under twiki/data, every error in the above log excerpt stopped appearing. Thanks, Peter and Richard for the helpful hints.

-- MeganGolding - 28 Jun 2002

Comment from a more recent install... As installed on Win2k (TWiki20030201, win cookbook install) I got the same error. Default perms, in my case, were -rw-r--r-- for data files (*.txt) and -r--r--r-- for RCS files (*.txt,v). Instead of opening up the perms to the world I did a chown -R system * (in twiki/data). Basic edits/saves/diffs work. Still testing.

Can someone comment about permissions vs owner fixes to this problem?

-- JohnDhom - 23 Jul 2003

Some windows 2k/xp + cygwin installs get weird permissions problems. I've not been able to get completely to the bottom of it yet, but see AnotherInsecureDirectory for a possible solution.

-- MattWilkie - 24 Jul 2003

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2003-07-24 - MattWilkie
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.