Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: maggymaesmith on February 22, 2021, 02:41:49 AM

Title: Empty settings files - all of a sudden
Post by: maggymaesmith on February 22, 2021, 02:41:49 AM
Forum has been running for years - keep it updated ... currently running 2.0.18 - moderator reported it was down - checked the files and the settings files were zero bytes.  What would cause this other than a hacker? I see no signs of files being changed other than the settings.
Title: Re: Empty settings files - all of a sudden
Post by: Aleksi "Lex" Kilpinen on February 22, 2021, 02:48:02 AM
It's been a known issue for some time, that in certain conditions where SMF tries to write to the file multiple times in a row it can fail and wipe it clean.
As far as I know, it should be fixed for 2.1, somehow I thought that was the case for 2.0 as well though - but could be I'm mistaken.
This shouldn't happen often, and if it does then most likely you have an issue somewhere else with the server.
A workaround in that case would be to keep the settings.php file read only when you don't need to change it.
Title: Re: Empty settings files - all of a sudden
Post by: shawnb61 on February 22, 2021, 02:52:21 AM
Yeah, a fix went in for 2.0.18 and apparently it didn't work.

This should probably be moved to the bug board.

Internal issue #30 re-opened.
Title: Re: Empty settings files - all of a sudden
Post by: Aleksi "Lex" Kilpinen on February 22, 2021, 02:54:11 AM
Moved.
Title: Re: Empty settings files - all of a sudden
Post by: maggymaesmith on February 22, 2021, 03:17:01 AM
Thank you for responding so quickly - I thought we were hacked but I couldn't see any other signs. I changed the  database username and password just in case.
I'll change it to read only. Good to know
Title: Re: Empty settings files - all of a sudden
Post by: live627 on February 22, 2021, 06:07:01 AM
How active is your site (concurrent users)?