Recently I encountered an interesting problem with Kate. When ever I opened certain files it opened them in read only mode. The files had the necessary permissions to let me write and I could open them in nano or vim and edit them successfully.
There can be multiple reasons for this happening:
- File is in use in some program (known to cause problems with Kate)
- File is a PHP file and being accessed somewhere
- File has more than 1024 characters in a line. (The limit might vary but after a point the files are opened as read only)