On Sun, 2015-01-11 at 17:40 +0000, John Horne wrote:
Hello,
I have been testing the $wgReadOnly and $wgReadOnlyFile options. My understanding is that these will prevent mediawiki from writing to the database and hence not allow pages to be updated. I have tried both options on servers running mediawiki 1.19.2 and 1.24.0 - neither option on either server seems to work. In all cases I am still able to modify wiki pages.
I have now got both options working. The wgReadOnly option is now working, but I'm not sure why. The wgReadOnlyFile option it seems doesn't like using files in '/tmp'. It seems that the PHP functions is_file and filesize require the parent directory to have world 'x' permissions. For some reason it doesn't seem to like the sticky bit of /tmp (despite 'x' being present). So by using a different directory for the file, the option then worked as expected.
John.