Advertisement:

Author Topic: Empty settings files - all of a sudden  (Read 268 times)

Offline maggymaesmith

  • Semi-Newbie
  • *
  • Posts: 14
Empty settings files - all of a sudden
« 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.

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Project Manager
  • SMF Super Hero
  • *
  • Posts: 19,613
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: Empty settings files - all of a sudden
« Reply #1 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.
A Finnish Project Manager (Support Specialist)
Happily running multiple SMF 2.x installations.
 Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,978
    • sbulen on GitHub
Re: Empty settings files - all of a sudden
« Reply #2 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.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Project Manager
  • SMF Super Hero
  • *
  • Posts: 19,613
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: Empty settings files - all of a sudden
« Reply #3 on: February 22, 2021, 02:54:11 AM »
Moved.
A Finnish Project Manager (Support Specialist)
Happily running multiple SMF 2.x installations.
 Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline maggymaesmith

  • Semi-Newbie
  • *
  • Posts: 14
Re: Empty settings files - all of a sudden
« Reply #4 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

Offline live627

  • Developer
  • SMF Hero
  • *
  • Posts: 5,875
  • Gender: Male
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: Empty settings files - all of a sudden
« Reply #5 on: February 22, 2021, 06:07:01 AM »
How active is your site (concurrent users)?