I am trying to edit a file in vi editor - and when I try to save the changes it says READ ONLY. Even when I try to do a chmod I get an error saying I cannot do so.
I have logged in Unix using a personal ID and not a service one
I am trying to edit a file in vi editor - and when I try to save the changes it says READ ONLY. Even when I try to do a chmod I get an error saying I cannot do so.
I have logged in Unix using a personal ID and not a service one
Try opening editing the file in vim using: sudo vim <filename>
Some people also recommend adding this to your .vimrc file so you can open the file without sudo
then write to it anyway using :w!!
" Sudo to write
cnoremap w!! w !sudo tee % >/dev/null
Because you aren't owner of this file. You need to sudo vim
with an owner user.