Avatar of F-J-K
F-J-K
Flag for Canada asked on

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.

Regards,
F-J-K
Shell ScriptingLinux DistributionsEditors IDEs

Avatar of undefined
Last Comment
F-J-K

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
omarfarid

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Hugh McCurdy

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
nabeelmoidu

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
F-J-K

ASKER
omarfarid:

"make sure that the oracle home dir is created and owned by user oracle"

AFAIK, Home directory is created automatically by Oracle Installer. Thus, i'm trying to
edit the .bash_profile with the following entries and then install the Oracle:

# .bash_profile
ORACLE_BASE =/mnt/app/oracle;
ORACLE_SID=orcl10g
export ORACLE_BASE ORACLE_SID
unset ORACLE_HOME

Anyhow, i tried to login as Oracle user, i got the error that you see in snapshot 2 and 3. After that i desktop doesn't launch, the cursor just remains there with no tools loaded on desktop, so i had to restart.

If no solution found, i will have to move this question to Oracle category.

Thanks.
2.jpg
3.jpg
SOLUTION
omarfarid

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
F-J-K

ASKER
Solved
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck