What is causing my openhab.cfg file to change?

A week ago I rebooted my openHAB raspberry Pi server after installing the dirty cow fix. Soon after I noticed that my.openHAB was not working and I tracked that down to the security=EXTERNAL setting in openhab.cfg. For some reason this setting had been changed to security=ON. I changed it back to EXTERNAL.

Today there was a power failure and after restarting, my.openHAB was not working again and sure enough, I check the openhab.cfg and it has changed back to security=ON.

This is openHAB 1.8.3 running on a Pi with Jessie 4.4.

What could be causing this setting in openhab.cfg to keep resetting, and how do I stop it from happening?

My guess: your SD card is not working properly anymore. You need to replace it.

Check with other files and folders. Whatever you change on your system will be gone after reboot. Changes to your filesystem are stored in cache but can not be written to the sd card. If you try to flash a new image or change partitions you would get write warnings.

Do a backup of your important files right now.

Hi Thom,

You nailed it. Thanks!

The card is acting as though it is write protected. Fortunately I had a recent backup image so I did not lose any functionality.

I checked the logs from around the time that I did the update and did not see any unusual messages. Shouldn’t something as serious as an SD card fail generate and error message? I did not have debug on.

Thanks again.