I checked out this following link: Firefox ignoring it's own preference/settings in 12.10 but it wasn't resolved.
My specific situation is that I installed Ubuntu 16.04 onto an SSD and then synchronized Firefox. I keep getting warnings about closing all tabs. In the past, with 14.04, it worked correctly.
I am thinking I had to manually change a setting somewhere in a configuration file, maybe, but my searches are drawing a blank.
Unresolved
I tried the solutions below, I tried reinstalling Ubuntu 14.04 on top of what I had, and I tried upgrading to Ubuntu 16.04.
I finally did a clean install of 16.04 on a new HDD so I no longer have the problem.
sudo chown -R $USER: ~/.mozilla/firefox
solves your problem. It should save your settings from now on if that was the issue. Please report back whether it worked and I will convert this comment into an answer.about:preferences
) and see if there's a "user.js" file. If that file exists, maybe it's the cause of the problem. You should move it to the trash, restart Firefox, and see what happens.