ORACLE_HOME must be set and $ORACLE_HOME/dbs must be writable error in Xubuntu Linux 16.04

0

Looking for some advice and help on issues, I am having with a new install of Oracle XE on my laptop running Xubuntu Linux 16.04 LTS. I followed this post for my install.

In the Oracle XE install location /u01/app/oracle/product/11.2.0/xe/ there is a /bin folder with a createdb.sh file I am trying to run to install the initial XE DB but am getting the error ORACLE_HOME must be set and $ORACLE_HOME/dbs must be writable.

My .bashrc contains the below code so I am not sure if it is correct and if it is, why am I getting the $ORACLE_HOME must be set error.

export ORACLE_HOME="/u01/app/oracle/product/11.2.0/xe"
export ORACLE_SID="XE"
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE="/u01/app/oracle"
export LD_LIBRARY_PATH="$ORACLE_HOME/lib:$LD_LIBRARY_PATH"
export PATH="$ORACLE_HOME/bin:$PATH:."

In the terminal when I execute echo $ORACLE_HOME

I get

/u01/app/oracle/product/11.2.0/xe

which seems to me like the path is set correctly. On to the permissions of the $ORACLE_HOME/dbs directory. ls -l shows this

drwxr-xr-x  2 root root 4096 Jun  5 12:50 dbs

which depicts the owner (root) has write permission. I am kind of lost on all of this and again, this is my first go round with Oracle SQL in Linux. Any help is greatly appreciated. Thanks, all.

Edit: Set the same environment variables in /etc/bash.bashrc and rebooted but still, same error persists as before.

J2112O

Posted 2017-06-05T21:39:09.840

Reputation: 101

I have copied the actual question over. – music2myear – 2017-06-05T23:30:07.193

Answers

0

ORACLE_HOME should be owned by the oracle user, not root, because oracle runs as user oracle. Iirc it throws an error if you try to run it as root, so since you don't get that error it must be running as the correct user, for which the "others" access bits to $ORACLE_HOME/dbs are "r-x" which means not writeable.

Dave the Sax

Posted 2017-06-05T21:39:09.840

Reputation: 186