Problem : E212: Can’t open file for writing – vi Error in Suse Linux
Here is my problem:
I installed Suse linux on Virtual Machine. I logged in as a regular user and then switched to root. Afterwords, i typed this command:
#> /usr/sbin/useradd -g oinstall -G dba,oper oracle
In other words, i created a user called Oracle and then switched to Oracle user from root and tried to created .bash_profile from vi. When i do: wq, i get this error:
“.bash_profile” E212: Can’t open file for writing
Press ENTER or type command to continue
When i type this command q!, i get this error:
E138: Can’t write viminfo file /home/oracle/.viminfo!
Press ENTER or type command to continue
After i press enter, vi exits and i get back to the command prompt.
I have no idea why does this happen. Any help/suggestions/advice will be appreciated.