0

I'm using Oracle RAC in RH6, and when i try to use the 'oraenv' utility to set the variables with the user oracle, i get an error:

[oracle@vhor12 ~]$ . oraenv
/bin/.: Permission denied.

Using it in the same way with the root user works normally. Also, without the "dot space" preceding 'oraenv', also works.

Unfortunally, using without the 'dot space' will not have the same effect.

Anyone can give a clue?

Tks in advance.

chesterman
  • 65
  • 1
  • 3
  • 12

2 Answers2

1

I was facing the same problem and discovered. It seems that csh doesn't have permissions on running scripts with dot space

[root@dbtest01 ~]# su - oracle
[oracle@dbtest01 ~]$ echo $SHELL
/bin/csh
[oracle@dbtest01 ~]$ . oraenv
/bin/.: Permission denied.
[oracle@dbtest01 ~]$ logout
[root@dbtest01 ~]# usermod -s /bin/bash oracle
[root@dbtest01 ~]# su - oracle
[oracle@dbtest01 ~]$ . oraenv
ORACLE_SID = [oracle] ?

If you don't have root access, simply type:

$ bash

And you will be able to . oraenv

mrgamertag
  • 11
  • 2
  • Your problem is syntax, not permissions. `csh` doesn't understand `.` for sourcing a file. Spell out `source` instead and you will have better luck. http://unix.stackexchange.com/questions/36286/sourcing-a-file-inside-a-script – chicks Dec 29 '16 at 04:29
0

OK, got it. I was running under csh, and there it does not work in that way.

To use the syntax i was taliking before we have to use bash.

chesterman
  • 65
  • 1
  • 3
  • 12