I tried to edit a file by using Kate. But it said my file is read only (R/O). How can I change that? I tried
sudo chmod a+rw kirjeet.tex & kate kirjeet.tex
I have had this same problem a few times with kile (kate with other tex feature). If the line is too long (or any other thing it doesn't like) it comes up with a stupid error and you need to change the settings. After this, it sets the file into read only mode when you open it again. Check the tools menu, it may have the read only option switched on.