Tuesday, November 27, 2012

Oracle changePerm.sh script in versions 9.2.0.8, Oracle 10g

changePerm.sh is a script that allows users that do not belong to the "dba" group to access and execute files in the ORACLE_HOME directory.


The script is located in the ORACLE_HOME/install directory on Unix and Linux systems (there is no equivalent for Windows). This script ships with Oracle Database versions 9.2.0.8, Oracle 10g.

The changePerm.sh file is no more available nor necessary for Oracle database server 11.1.0.x because in 11g, permissions under the Oracle Home (including "others") are set correctly/relaxed. (oracle note 834626.1)


===================================
Before change:
$ ls -ld $ORACLE_HOME/lib
drwxr-x---   3 oracle   dba         5632 Nov 27 09:30 /fs/oracle/product/10204ee/lib

Running script:
$ cd $ORACLE_HOME/install
$ ls -l
total 964
-rwxr-xr-x   1 oracle   dba        11380 Nov 22  2007 changePerm.sh
-rw-r-----   1 oracle   dba            0 Jun  7  2005 createseed.sh
-rw-r-----   1 oracle   dba            0 Jun  7  2005 createseed1.sh
-rw-r-----   1 oracle   dba          618 Nov 26 14:19 envVars.properties
-rw-r-----   1 oracle   dba          131 Nov 26 13:51 envVars.properties.bak
-rwxr-xr-x   1 oracle   dba           38 Apr 19  2005 install.excl
drwxr-x---   2 oracle   dba          512 Nov 26 11:55 jlib
-rw-r-----   1 oracle   dba       437788 Nov 26 14:19 make.log
-rw-r-----   1 oracle   dba          102 Nov 26 14:19 portlist.ini
-rw-r--r--   1 oracle   dba          124 Nov 26 14:19 readme.txt
-rw-r--r--   1 oracle   dba         7609 Jan 12  2007 restrict.lst
-rwxr-xr-x   1 oracle   dba          822 Nov 26 14:16 rootdeletenode.sh
-rw-r--r--   1 oracle   dba        10031 Nov 26 14:16 rootlocaladd
-rw-r-----   1 oracle   dba            0 Jun  7  2005 seed.log
-rw-r--r--   1 oracle   dba         2808 Jul 14  2005 templocal
drwxr-x---   2 oracle   dba          512 Nov 26 14:19 unix
drwxr-x---   2 oracle   dba          512 Nov 26 14:13 utl
$ ./changePerm.sh

-------------------------------------------------------------------------------
Disclaimer: The purpose of this script is to relax permissions on some of the
files in the database Oracle Home so that all clients can access them.
Please note that Oracle Corporation recommends using the most restrictive file
permissions as possible for your given implementation.  Running this script
should be done only after considering all security ramifications.
-------------------------------------------------------------------------------

-n Do you wish to continue (y/n) [n]:
y
Spooling the error log /tmp/changePerm_err.log...

Finished running the script successfully

After change:

$ ls -ld $ORACLE_HOME/lib
drwxr-xr-x   3 oracle   dba         5632 Nov 27 09:40 /fs/oracle/product/10204ee/lib

===================================
Reference: http://www.orafaq.com/wiki/ChangePerm_sh

No comments:

Post a Comment