Cannot save files in PHPStorm

Maybe you came to that annoying message when you want to save something in PHP Storm but it refuses to and gives you options "cancel" or "revert changes", usually happens around some config files, like settings.php. Why is this so? Probably because you didn't put write permissions to folder where phpstorm is trying to write its temp files. You can solve this in two ways, set permissions to that folder to 777 or something or you can go to phpstorm settings, find safe writing disable it and you will not see this messages anymore.