01057: Save fails (content destroyed) due to filled quota

Summary: Save fails (content destroyed) due to filled quota
Created: 2008-11-10 04:22
Status: Awaiting feedback
Category: Bug
Priority: 5
Version: 2.1.27
OS: SunOS mremote 5.9 Generic_122300-16 sun4u/Apache/1.3.37 (Unix) PHP/4.4.4 mod_ssl/2.8.28 OpenSSL/0.9.8d

Description: Saving a wiki page when the webserver quota is full causes the wiki page save to fail. The file is saved with size 0, thus destroying the content.

The content of the following files was lost (given size 0): ~/public_html/pmwiki/wiki.d/Main.HomePage ~/public_html/pmwiki/wiki.d/Main.RecentChanges ~/public_html/pmwiki/wiki.d/Site.AllRecentChanges

To reproduce: 1. Create a wiki page with content 2. Fill the quota of the webserver user (or maybe fill the partition?) 3. Try to modify and save the wiki page.

Result: Content is lost and the wiki page file gets size 0.

Desired result: The save should fail with an error message and the original content should be preserved.

Note: Unfortunately, I'm unable to check this problem (with the latest version of PMwiki), since I'm on a shared university network. Filling the quota (of the webserver user) would break all the Wiki's/Blogs/CMS systems on the webserver.

Hi. Could you provide more details? The PmWiki PageStore->write() function creates a Group.Page,new file and checks many times if writing to it is successful, then it checks if it is not too small, and only then it replaces the current file with the new one. --Petko July 07, 2009, at 10:06 PM